Git: Agent admitted failure to sign using the key. Permission denied (publickey).

已经配置完SSH keys后执行git clone时会报下面错误:

Agent admitted failure to sign using the key. 
Permission denied (publickey).

执行 ssh -T git@domain 时也会报这个错误,解决方法:
使用 ssh-add 命令把密钥添加到ssh-agent的高速缓存中:

 ssh-add   ~/.ssh/id_rsa 

注意:根据个人的密匙命名不同更改 id_rsa

参考:
Git: Agent admitted failure to sign using the key. Permission denied (publickey). fatal: Could …

发布了486 篇原创文章 · 获赞 88 · 访问量 72万+

猜你喜欢

转载自blog.csdn.net/yzpbright/article/details/88975525