fatal: Could not read from remote repository. Please make sure you have the correct access rights
使用git clone命令从github上同步github上的代码库时,如果使用SSH链接,系统会报下面的错误:Permission denied (publickey).fatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository
文章共499字 · 阅读需要大约2分钟
一键AI生成摘要,助你高效阅读
问答
·
使用git clone命令从github上同步github上的代码库时,如果使用SSH链接,系统会报下面的错误:
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
原因:
你的SSH key没有添加到github帐号设置中
解决:
需要在本地创建SSH key,然后将生成的SSH key文件内容添加到github帐号上去。创建SSH key的方法很简单。
接着拷贝.ssh/id_rsa.pub文件内的所以内容,将它粘帖到github帐号管理中的添加SSH key界面中。
打开github帐号管理中的添加SSH key界面的步骤如下:
1. 登录github
2. 点击右上方的settings图标,添加即可
再进行git clone 操作:
更多推荐
已为社区贡献3条内容
所有评论(0)