资讯专栏INFORMATION COLUMN

CentOS使用在有私钥时使用ssh进行git clone要求输入密码的解决方案

snifes / 2329人阅读

i"m a CentOS user using Fedora 23
There exists some question when

  $ git clone git clone metastasis@shtech.org:user/myname/1/0

my bash asked me to input the password for metastasis@shtech.org all the times
then i did

  $ ssh -vvv metastasis@shtech.org

my bash returned

 debug1: Trying private key: /home/bob/.ssh/id_dsa
 debug1: Skipping ssh-dss key /home/bob/.ssh/id_dsa for not in PubkeyAcceptedKeyTypes

and skipped my id_dsa file
After asking my friends, i

 # nano /etc/ ssh/ssh_config

and deleted the ‘#’ before

IdentityFile ~/.ssh/id_dsa

it didn"t work on neither git clone nor ssh
Then i looked my question up in Google and added a line in /etc/ ssh/ssh_config

PubkeyAcceptedKeyTypes ssh-dss

it also didn"t work and returned

/ssh_config line 89 : Bad key types "ssh-dss"

i changed "ssh-dss" to "ssh-dsa" or "id-dsa" , but it still didn"t work
Now i finished it myself by adding PubkeyAcceptedKeyTypes ssh-dss after Host * like

Host *
    PubkeyAcceptedKeyTypes ssh-dss

and i cloned it successfully

文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。

转载请注明本文地址:https://www.ucloud.cn/yun/17416.html

相关文章

  • Git 安装和使用经验总结

    摘要:在装有客户端的电脑使用执行得到如下界面输入回车,提示输入密码,无视继续回车走起结束后会在电脑用户名中生成一个文件这个文件会保存所有连接过的信息,下一次连接这个就不会有上面的提示了。六常识及注意事项提交时会自动忽略空文件夹 GIt安装和使用经验总结 此文是本菜鸡在实践多次git搭建内网服务版本库和GitHub上的使用总结部分参考了这位大佬的博客https://www.cnblogs.co...

    zzbo 评论0 收藏0

发表评论

0条评论

最新活动
阅读需要支付1元查看
<