Reputation: 3969
I tried doing git pull --rebase
and I am getting the following error:
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.
I tried doing git remote -v
and the origin is properly listed.
How can I fix this error?
Upvotes: 16
Views: 47900
Reputation: 16152
Just add the hostname to /etc/hosts
file
# IP hostname
1.55.4.5.66 [email protected]
Upvotes: 2
Reputation: 12389
I have recently solved this issue by removing ssh
from the remote address on my fork:
origin ssh://[email protected]:yunus/client.git (fetch)
origin ssh://[email protected]:yunus/client.git (push)
...
updated as:
origin [email protected]:yunus/client.git (fetch)
origin [email protected]:yunus/client.git (push)
...
Upvotes: 11
Reputation: 875
I had run into the same error. Fix it by switching to another DNS server.
You can try Google DNS
Get answer from here
Upvotes: 1