解决gitosis.init.InsecureSSHKeyUsername: Username contains not allowed characters问题
生活随笔
收集整理的这篇文章主要介绍了
解决gitosis.init.InsecureSSHKeyUsername: Username contains not allowed characters问题
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
安装gitosis是时候,通过:
sudo -H -u git gitosis-init < /tmp/id_rsa.pub
出现的错误:公钥里面包含了不和法的字符。
这是我生成的公钥:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCxHMr0ex3rxvfIdQTsUgbMuU7THEu6L4uHpHXZ/mwA/B/GN3uRRGfStj9KLyKRfPkwxci9OTkHz5kLIbG0EvJL+nbXo++w40EpfhmiG9Unm4QeRTjK2GU38zvxBBlbiCIeupy/rNjv1lHbPn5fYetKg7X/1IP1CndB3oRDmq9oNfZBBI3qulukyHpkj6CVHwZB4x5WQIa2NtkafxSj0B9CO2YfTa4L0kfm8PcN1F4G8cUrlWEUpzkv4pe0fZ2nkvcsrmYMeV8MkTaeKM5e8NDWEafUTAfuG+Umh6gOC0Wdp/quonGiibz3OL+AuNo1o0QAucds2euywFQY3N/ekhP3 git@3a4144731b7c原因是在公钥【git@3a4144731b7c】里面@后面的字符串以数字开头了(用户id以数字开头了)。
解决方法:
重启系统,重新生成一遍sshkey,直到生成的用户id不是以数字开头位置(重启系统的目的在于,在当前环境下,删除生成的sshkey,再重新生成的sshkey都是一样的)
参考地址:http://stackoverflow.com/questions/2117603/gitosis-installation-error
文末最后一段回答
总结
以上是生活随笔为你收集整理的解决gitosis.init.InsecureSSHKeyUsername: Username contains not allowed characters问题的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: git通过authorized_keys
- 下一篇: git通过gitosis来管理权限(三)