天天看點

Git Pull Failed: Could not read from remote repository.

Git拉取項目時報錯

Git Pull Failed: Could not read from remote repository.

這是由于你的git位址采用了ssh方式,切換為https方式即可,也可能是你的倉庫位址不對,可以使用如下指令先檢視一下:

$ git remote -v
origin  ssh://[email protected]:22222/YourProject.git (fetch)
origin  ssh://[email protected]:22222/YourProject.git (push)
           

你會發現跟你項目的遠端位址不同,找到倉庫位址http://開頭的,如圖,複制下來:

Git Pull Failed: Could not read from remote repository.

然後在終端中輸入:

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

重新拉取即可