nshastri@N-SHASTRI ~/datasciencecoursera (master) $ git push origin master
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.
This can be caused by incorrect proxy settings, or error typing names, make sure you're using the exact URL of whatever you're trying to do. Try these commands. Also set user- name and user-email. Hope this will solve your error.
A commit gets rejected and causes a failed to push some refs to error because the remote branch contains code that you do not have locally. What this means is that your local git repository is not compatible with the remote origin. Based on the above, your local machine is missing commits C and D.
What is the meaning of error: 'Unable to resolve host name'? This error means that the hostname you are trying to connect to cannot be resolved to an IP address. (Hostnames are resolved to IP addresses by a DNS (Domain NameServer)). Please check what you have entered in the Address field.
The Git “fatal: Could not read from remote repository” error occurs when there is an issue authenticating with a Git repository. This is common if you have incorrectly set up SSH authentication. To solve this error, make sure your SSH key is in your keychain and you connecting to a repository using the correct URL.
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://[email protected]/nkshastri/datasciencecoursera
Then try again:
git push -u origin master
(with master
, not maaster
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With