解决git pull时报fatal:Could not read from remote repository错误

git pull 时报如下错误,意思是无法从远程存储库中读取。

解决 git pull 时报 fatal:Could not read from remote repository 错误

分析原因

我试了一下git clonegit push都没有问题,说明 ssh 也是通的。

这个时候想想是不是路径问题。果然,因为公司要求将本地代码库地址从 https 切换到 ssh,所以问题出现在这里,路径不对。

所以修改路径即可,在当前项目中,找到 terminal,输入,git remote -v查看目前存储的远端仓库路径;然后,使用git remote set-url origin +修改后的正确路径

解决 git pull 时报 fatal:Could not read from remote repository 错误

然后,在 git pull 试一下,就可以了。

推荐阅读:Windows 如何查看 ssh 公钥?

「点点赞赏,手留余香」

1

给作者打赏,鼓励TA抓紧创作!

微信微信 支付宝支付宝

还没有人赞赏,快来当第一个赞赏的人吧!

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
码云笔记 » 解决git pull时报fatal:Could not read from remote repository错误

发表回复