Posted By: Anonymous
I have a project hosted on GitHub. I fail when trying to push my modifications on the master. I always get the following error message
Password for 'https://[email protected]': remote: Invalid username or password. fatal: Authentication failed for 'https://[email protected]/eurydyce/MDANSE.git/'
However, setting my ssh key to github seems ok. Indeed, when I do a
ssh -T [email protected] I get
Hi eurydyce! You've successfully authenticated, but GitHub does not provide shell access.
Which seems to indicate that everything is OK from that side (eurydyce being my github username). I strictly followed the instructions given on github and the recommendations of many stack discussion but no way. Would you have any idea of what I may have done wrong?
https://[email protected]/eurydyce/MDANSE.git is not an ssh url, it is an https one (which would require your GitHub account name, instead of ‘
git remote set-url origin [email protected]:eurydyce/MDANSE.git
The OP Pellegrini Eric adds:
That’s what I did in my
~/.gitconfigfile that contains currently the following entries
[remote "origin"] [email protected]:eurydyce/MDANSE.git
This should not be in your global config (the one in
You could check
git config -l in your repo: that url should be declared in the local config:
So make sure you are in the repo path when doing the
git remote set-url command.
That applies only for HTTPS URLS, SSH is not affected by this limitation.