解决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来管理权限(三)