mtyson
mtyson

Reputation: 8550

git credential helper not working

I'm trying to save my git password to avoid typing every time.

I am using git bash on windows 10.

git continues to demand a password everytime I hit remote.

(Is git bash why its not working?)

I have tried:

git config --global credential.helper 'cache --timeout 28800'

And:

git config --global credential.helper store

and:

git config --global credential.helper wincred

I've tried it in both git bash and cmd, so I guess it's not git bash causing the problem.

Upvotes: 10

Views: 18646

Answers (1)

VonC
VonC

Reputation: 1323553

First, for Windows, the credential helper to use is manager
(see more at "How to remove github login popup asking for credentials?"):

git config --global credential.helper manager

Second, this only works for HTTPS URLs, not SSH ones ([email protected])

For SSHs, it is either:

  • asking for a passphrase because your private SSH key is passphrase-protected.
    If that is the case, check ssh-agent: see "Adding your SSH key to the ssh-agent".
  • asking for Matt's password because it does not find your public key on the remote server at ~matt/.ssh/authorized_keys.

So when Matt comments that:

It looks like this: origin [email protected]:/home/matt/baz.git (fetch)

You need to keep in mind that the Git credential manager is not involved, as it would only apply to HTTPS URLs. The OP's issue is not releated to a credential manager.

Upvotes: 14

Related Questions