为什么gitosis init序列失败?

时间:2014-12-13 06:18:25

标签: git gitosis

运行init命令后,我看到以下错误消息:

  -sh-4.1$ gitosis-init <id_rsa_git.pub 
Traceback (most recent call last):
  File "/usr/local/bin/gitosis-init", line 9, in <module>
    load_entry_point('gitosis==0.2', 'console_scripts', 'gitosis-init')()
  File "/usr/local/lib/python2.7/site-packages/gitosis-0.2-py2.7.egg/gitosis/app.py", line 24, in run
    return app.main()
  File "/usr/local/lib/python2.7/site-packages/gitosis-0.2-py2.7.egg/gitosis/app.py", line 38, in main
    self.handle_args(parser, cfg, options, args)
  File "/usr/local/lib/python2.7/site-packages/gitosis-0.2-py2.7.egg/gitosis/init.py", line 123, in handle_args
    user = ssh_extract_user(pubkey)
  File "/usr/local/lib/python2.7/site-packages/gitosis-0.2-py2.7.egg/gitosis/init.py", line 39, in ssh_extract_user
    raise InsecureSSHKeyUsername(repr(user))
gitosis.init.InsecureSSHKeyUsername: Username contains not allowed characters: 'AAAAB3NzaC1yc2EAAAABIwAAAQEAwCDbFIFqHKMwruJiktoSrErfA0bymw78HOWPSyIdEo2K9krTc7Xa6LOrn/BlSJflw4pd1cKvbl4YIxfKiNRsJDHBV/g0h6iN3cLgWnJ/DIQ3OhG  ------------the public key other 

您如何解决这种gitosis初始化序列?

2 个答案:

答案 0 :(得分:0)

我正在解决这个问题  用格式更改发布密钥,添加名称和服务器开始密钥

ssh-rsa git@yourdomain.com
AAAAB3NzaC1yc........................etc
~                                                                             

答案 1 :(得分:0)

确保使用以下命令创建git ssh密钥:

ssh-keygen -t rsa -f "path/to/id_rsa_git" -C "gitosis admin key" -q -P "" 

这也适用于gitolite密钥。 - 你真的应该使用gitolite。 Gitosis自2009年以来已经过时了)