即使已经在Github中配置了私钥,但是在执行git pull的时候出现如下的错误:

Permission denied (publickey). 
fatal: Could not read from remote repository.

这是因为没有将ssh加入到验证ssh-agent中,可以通过以下的方式添加

ssh-add -K ~/.ssh/id_rsa

完整说明参照官网文档

参考:

Adding your SSH key to the ssh-agent

GitHub Error Message - Permission denied (publickey)

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐