码迷,mamicode.com
首页 > 其他好文 > 详细

git clone permission denied(publickey)

时间:2015-08-25 23:44:11      阅读:259      评论:0      收藏:0      [点我收藏+]

标签:git   clone   permission denied   ssh   

创建ssh密钥后,从github clone仓库到本地出现permissoin denied(publickey)错误。

参考官方文档(generating-ssh-keys)的方法来添加ssh密钥到ssh-agent:

连接到ssh-agent:

ssh-agent -s
添加私钥:

ssh-add ~/.ssh/id_rsa

出现Could not open a connection to your authentication agent错误。

需要在连接到ssh-agent前,执行:

ssh-agent bash
这样就能成功的clone了:
$ git clone git@github.com:dnawym/Concurrency.git
Cloning into 'Concurrency'...
Warning: Permanently added the RSA host key for IP address '192.30.252.131' to the list of known hosts.
remote: Counting objects: 35, done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 35 (delta 10), reused 34 (delta 9), pack-reused 0
Receiving objects: 100% (35/35), 3.32 KiB | 0 bytes/s, done.
Resolving deltas: 100% (10/10), done.
Checking connectivity... done.




版权声明:本文为博主原创文章,未经博主允许不得转载。

git clone permission denied(publickey)

标签:git   clone   permission denied   ssh   

原文地址:http://blog.csdn.net/yamingwu/article/details/47987655

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!