Home > Net >  git prompting for password since updating to 2.36.1
git prompting for password since updating to 2.36.1

Time:06-09

we have been using git for years with a local gitlab installation. We have ssh keys setup, so a simple git push would not prompt for credentials.

since updating to 2.36.1, we are now being prompted for a password on git push. trouble is, we have MFA enabled, so providing the password doesn't work.

I don't know if this is relevant, but we were also warned that the repository was owned by someone else and followed the suggestion to git config --global --add safe.directory *foldername*

I've tried adding a new RSA ssh key and it hasn't helped.

any ideas?

CodePudding user response:

A password or MFA (meaning using a token as a password) should only be relevant for an HTTPS URL.
For an SSH one, you might need to deal with a passphrase, if your private key was created encrypted.

So check first what git remote -v returns inside your repository.
If it is actually an HTTPS one, check the output of git config --global credential.helper: it might have cached an obsolete password for your GitLab account.

CodePudding user response:

doing a verbose test with

ssh -vT [email protected]

showed that my rsa key was being attempted and that git was falling back to password.

I added a new ed25519 key with

ssh-keygen -t ed25519

and it works! so the new version of git doesn't like my old RSA key?

EDIT: even though I added a new RSA key and thought I had configured ssh to use it, the verbose test showed that it wasn't being tried. So either it doesn't like RSA keys at all, or a new RSA key would have worked just as well if I'd given it the default name.

  • Related