github clone 开源代码报Permission denied (publickey)

 报错:

[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

vi ~/.ssh/id_rsa.pub

将其中的内容复制下来

登录https://github.com/ 自己账号,点击右上角图标在下拉框中选择settings

 

选择SSH and GPG keys

点"New SSH key"创建一个public key

 

Tittle随便输入一个喜欢的名字,然后将刚才从本机id_rsa.pub中复制出来的公钥贴到key输入框中,保存就可以正常访问git上的开源代码了。

猜你喜欢

转载自www.cnblogs.com/liwutao/p/12974059.html
今日推荐