Bug 470359

Summary: gitosis-init fails to init
Product: [Fedora] Fedora Reporter: David Nalley <david>
Component: gitosisAssignee: John A. Khvatov <ivaxer>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: medium    
Version: rawhideCC: ivaxer, ivaxer
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-11-07 13:37:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Nalley 2008-11-06 21:05:02 UTC
Description of problem: When trying to initialize gitosis it fails. 


Version-Release number of selected component (if applicable): gitosis-0.2-6.20080825git.fc10.noarch



How reproducible: everytime


Steps to Reproduce:
1.read /usr/share/doc/gitosis-0.2/README.fedora
2.follow directions and execute " sudo -H -u gitosis gitosis-init </tmp/sshkeys.pub"
3.Watch python vomit being puked by gitosis
  
Actual results: Fails to initialize


Expected results: Initializes gitosis repository. 


Additional info:


[root@git ~]#  sudo -H -u gitosis gitosis-init </tmp/authorized_keys 
Traceback (most recent call last):
  File "/usr/bin/gitosis-init", line 8, in <module>
    load_entry_point('gitosis==0.2', 'console_scripts', 'gitosis-init')()
  File "/usr/lib/python2.5/site-packages/gitosis/app.py", line 24, in run
    return app.main()
  File "/usr/lib/python2.5/site-packages/gitosis/app.py", line 38, in main
    self.handle_args(parser, cfg, options, args)
  File "/usr/lib/python2.5/site-packages/gitosis/init.py", line 121, in handle_args
    user = ssh_extract_user(pubkey)
  File "/usr/lib/python2.5/site-packages/gitosis/init.py", line 39, in ssh_extract_user
    raise InsecureSSHKeyUsername(repr(user))
gitosis.init.InsecureSSHKeyUsername: Username contains not allowed characters: 'AAAAB3NzaC1yc2EAAAABIwAAAQEAtqqDXzCNpuQvr3yJa1XbhHDTW/hRwGMZCbninWxwWsd/E7QkuCdstBT2iGihbizbZl(balanceofpubkeysnipped as extraneous)

Comment 1 John A. Khvatov 2008-11-07 11:37:31 UTC
(In reply to comment #0)
> Description of problem: When trying to initialize gitosis it fails. 
> 
> 
> Version-Release number of selected component (if applicable):
> gitosis-0.2-6.20080825git.fc10.noarch
> 
> 
> 
> How reproducible: everytime
> 
> 
> Steps to Reproduce:
> 1.read /usr/share/doc/gitosis-0.2/README.fedora
> 2.follow directions and execute " sudo -H -u gitosis gitosis-init
> </tmp/sshkeys.pub"
> 3.Watch python vomit being puked by gitosis
> 
> Actual results: Fails to initialize
> 
> 
> Expected results: Initializes gitosis repository. 
> 
> 
> Additional info:
> 
> 
> [root@git ~]#  sudo -H -u gitosis gitosis-init </tmp/authorized_keys 
> Traceback (most recent call last):
>   File "/usr/bin/gitosis-init", line 8, in <module>
>     load_entry_point('gitosis==0.2', 'console_scripts', 'gitosis-init')()
>   File "/usr/lib/python2.5/site-packages/gitosis/app.py", line 24, in run
>     return app.main()
>   File "/usr/lib/python2.5/site-packages/gitosis/app.py", line 38, in main
>     self.handle_args(parser, cfg, options, args)
>   File "/usr/lib/python2.5/site-packages/gitosis/init.py", line 121, in
> handle_args
>     user = ssh_extract_user(pubkey)
>   File "/usr/lib/python2.5/site-packages/gitosis/init.py", line 39, in
> ssh_extract_user
>     raise InsecureSSHKeyUsername(repr(user))
> gitosis.init.InsecureSSHKeyUsername: Username contains not allowed characters:
> 'AAAAB3NzaC1yc2EAAAABIwAAAQEAtqqDXzCNpuQvr3yJa1XbhHDTW/hRwGMZCbninWxwWsd/E7QkuCdstBT2iGihbizbZl(balanceofpubkeysnipped
> as extraneous)

It's work fine for my ssh-pubkey on rawhide. I assume you have the wrong file format.
Try to copy id_rsa.pub key only (without comments, etc), run sudo -H -u gitosis gitosis-init, paste pubkey, then ^D.

Example id_rsa.pub:
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA14suUY8j8jn3++25JS1ksrWKgnE+5AjUiF1DIpNlAmu3iNJNGzoTNrEiYPANJOGRpAp0eV+xgtIYx0wcNoGNDBhsH8sDDCRiGYGHtUJgD1shmOHfp7QpRVT3NozH6xwtu7xHwGpOnzzuUXd64N/cqo0jAVh4jM0lXhe+Z1cr42THtbiBeaeAlB8d/s1WZSlsZj77wEKbIGp6WE/o9iCrf8GhH68OBMiAMawOvcrsMwfSoc9IualLHBOM8lCnUlVVo0sNP+VXPspu2XGYdFC9UkghYyHr5WJR3ayOXrJYXniHta+G/LnaeQtn0fx4D02mzTsgBJSF9Tp4IC2eU+l7oQ== ivaxer@rawhide

If this does not work too, then please attach your pubkey to next comment.

Comment 2 David Nalley 2008-11-07 13:37:21 UTC
That worked - I'll close as notabug. 

thanks