git pull 时 报错如下信息:
ssh: Could not resolve hostname https: nodename nor servname provided, or not known
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
这是由于你的git地址采用了ssh方式,切换为https方式即可,也可能是你的仓库地址不对,可以使用如下命令先查看一下:
$ git remote -v
origin https:YourUserName/YatouTest00123.git (fetch)
origin https:YourUserName/YatouTest00123.git (push)
你会发现跟你的github地址不一样,登上你的github,找到仓库地址,如图,复制下来:
然后在终端中输入:
$ git remote set-url origin https://github.com/YourUserName/YatouTest00123.git
注:origin后面换成刚刚让你复制的仓库地址。
然后重新 执行 git pull origin master 即可pull成功。