setting up git ssh access error: gitosis need more than 1 value to unpack

When I go to set up git to run with ssh, I get the following error:

file "usr/lib/python2.5/site-packages/gitosis-0.2-py2.5.egg/gitosis/", 
line 35, in ssh_extract_user 
_, user = pubkey.rsplit(None, 1)
ValueError: need more than 1 value to unpack

the command I typed:

  • git checkout master error: the following untracked working tree files would be overwritten by checkout
  • jenkins pipeline cannot check code into git
  • Does increasing the number of unified diff context lines have any downsides?
  • How can I recover a lost commit in Git?
  • Can I make a pull request on a gist on GitHub?
  • “force” git commit on local to external via push?
  • sudo -H -u git gitosis-init < /home/sean/.ssh/

    I am running the ubuntu long release server 8.04

  • How can I display the current branch and folder path in terminal?
  • How do I use tig to view the diff for a file which is changed but not commited?
  • Git log --graph; HEAD to top
  • Distributed issue tracker for git with usable Eclipse Mylyn support?
  • Why is '#define alloc_nr(x) (((x)+16)*3/2)' macro used in many cache.h files?
  • Git workflow for different versions of a framework
  • 3 Solutions collect form web for “setting up git ssh access error: gitosis need more than 1 value to unpack”

    I have fixed this by modifying generated public key file, at the end it has user name appended,remove special characters and register public key with gitosis.

    If public key is

    ssh-rsa AAAAB3NzaC1yc2E ……. …..

    update this as

    ssh-rsa AAAAB3NzaC1yc2E ……. …..

    Further refer

    This should be related to your ssh key format, as illustrated by this thread.

    I used PuttyGen on Windows to generate my public key (SSH2 RSA 1024) and save it locally, and then I uploaded it to /tmp/ using pscp, but then when I ran

    sudo -H -u git gitosis-init < /tmp/

    I kept getting errors, eg:

    gitosis.init.InsecureSSHKeyUsername: Username contains not allowed characters: ‘—‘


    gitosis.init.InsecureSSHKeyUsername: Username contains not allowed characters:’”rsa-key-20081202”’

    or (after I got rid of everything in the file but the key itself):

    ValueError: need more than 1 value to unpack

    I figured that PuttyGen had generated an SSH2 public key file in a slightly different format, and ‘git gitosis-init’ wanted a user name at the beginning, so I went here:

    and saw that I could keep the “—BEGIN…” and “—END” parts, and replace the “comment: ...” line (generated by PuttyGen) with a line reading:

    subject: git

    And it worked! I got the output:

    Initialized empty Git repository in /home/git/repositories/gitosis-admin.git/ 
    Reinitialized existing Git repository in /home/git/repositories/gitosis-admin.git/

    this key worked for me
    puttygen on windows, ssh-2-rsa, 1024

    Git Baby is a git and github fan, let's start git clone.