我尝试git pull --rebase
,我收到以下错误:
ssh: Could not resolve hostname git: 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 remote -v
并正确列出了原点。
如何解决此错误?
答案 0 :(得分:3)
我最近通过从fork上的远程地址中删除ssh
来解决了这个问题:
origin ssh://git@ghe.company.net:yunus/client.git (fetch)
origin ssh://git@ghe.company.net:yunus/client.git (push)
...
更新为:
origin git@ghe.company.net:yunus/client.git (fetch)
origin git@ghe.company.net:yunus/client.git (push)
...
答案 1 :(得分:2)
只需将主机名添加到/etc/hosts
文件
# IP hostname
1.55.4.5.66 hostname@host.com
答案 2 :(得分:1)