Git拉取项目时报错

Git Pull Failed: Could not read from remote repository.

这是由于你的git地址采用了ssh方式,切换为https方式即可,也可能是你的仓库地址不对,可以使用如下命令先查看一下:

$ git remote -v
origin  ssh://xxx@192.168.1.111:22222/YourProject.git (fetch)
origin  ssh://xxx@192.168.1.111:22222/YourProject.git (push)

你会发现跟你项目的远程地址不同,找到仓库地址http://开头的,如图,复制下来:

在这里插入图片描述

然后在终端中输入:

$ git remote set-url origin http://xxxx.git

重新拉取即可

Logo

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

更多推荐