2010-02-19 8 views
6

अनपैक करने के लिए जब मैं ssh साथ चलाने के लिए Git स्थापित करने के लिए जाओ, मैं निम्नलिखित त्रुटि मिलती है:Git ssh पहुँच त्रुटि की स्थापना: gitosis 1 से अधिक मूल्य की जरूरत है

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

आदेश मैं टाइप किया:

sudo -H -u git gitosis-init < /home/sean/.ssh/pubkey.pub 

मैं ubuntu लंबे रिहाई सर्वर 8.04

उत्तर

4

यह आपके ssh कुंजी प्रारूप से संबंधित होना चाहिए चला रहा हूँ, 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/id_rsa.pub using pscp , but then when I ran

sudo -H -u git gitosis-init < /tmp/id_rsa.pub 

I kept getting errors, eg:

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

or:

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:

http://www.rfc-archive.org/getrfc.php?rfc=4716

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/ 
+0

धन्यवाद आदमी, बस एक ही समस्या –

5

मैं उत्पन्न सार्वजनिक कुंजी फ़ाइल को संशोधित करके इस तय कर दी है, अंत में यह उपयोगकर्ता नाम संलग्न है, विशेष वर्ण को हटाने और रजिस्टर gitosis साथ सार्वजनिक कुंजी।

तो सार्वजनिक कुंजी

ssh-rsa AAAAB3NzaC1yc2E ....... ..... .....== [email protected]

अद्यतन इस रूप में

ssh-rsa AAAAB3NzaC1yc2E ....... ..... .....== [email protected]

इसके अलावा उल्लेख https://bugzilla.redhat.com/show_bug.cgi?id=470359

+0

बिंगो थी, यह +1 था। –

0

इस कुंजी खिड़कियों पर मेरे लिए काम किया puttygen है, ssh-2-आरएसए, 1024

ssh-rsa [email protected] 
AAAAB3N-lksdfwejekjvcjsndgefjhbdfzuegjksafdiuewhdskajdfeiudhksj 
... 
... 
GncwFuk= 
संबंधित मुद्दे