在打算从远程仓库使用
git pull origin
更新代码到本地时,发送了如下错误。
ssh: connect to host gitlab.com port 22: No route to host
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
解决办法:
终端输入
git config --local -e
将url = git@github.com:xxxxx改为url = https://github.comxxxxx
(此地址可通过点击clone弹出的地址栏复制)
修改后保存,再git pull一下就OK了