您的位置:首页 > 运维架构 > Linux

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

2016-10-18 17:59 1041 查看
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 retur/ssh_config line 89 : Bad key types ‘ssh-dss’hanged ‘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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  centos git