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
‘).
Try to use ssh://[email protected]:eurydyce/MDANSE.git
or just [email protected]:eurydyce/MDANSE.git
git remote set-url origin [email protected]:eurydyce/MDANSE.git
The OP Pellegrini Eric adds:
That’s what I did in my
~/.gitconfig
file 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: <yourrepo>/.git/config
.
So make sure you are in the repo path when doing the git remote set-url
command.
As noted in Oliver‘s answer, an HTTPS URL would not use username/password if two-factor authentication (2FA) is activated.
In that case, the password should be a PAT (personal access token) as seen in “Using a token on the command line“.
That applies only for HTTPS URLS, SSH is not affected by this limitation.