Narendra Kumar Shastri Narendra Kumar Shastri - 28 days ago 19
Git Question

Git Push Error - Could not resolve host name

nshastri@N-SHASTRI ~/datasciencecoursera (master)
$ git push origin maaster



ssh: Could not resolve hostname https: no address associated with name

fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Answer

Simply type:

git remote -v

and double-check the url associated with origin for your upstream repo.

Once you have the right url, update your remote origin with another git remote command:

git remote set-url origin /the/right/url

In your case, the url is wrong:

https:/github.com/nkshastri/datasciencecoursera.git
# instead of:
https://github.com/nkshastri/datasciencecoursera.git
     ^^^^

Simply type:

git remote set-url origin https://nkshastri@github.com/nkshastri/datasciencecoursera

Then try again:

git push -u origin master

(with master, not maaster)