Steve B
Steve B

Reputation: 37710

Git credential manager and manually created PAT

I have to work from computers owned by customer. Our work's code is managed under a Azure Dev Ops repository, where I log in using my personal Microsoft Account.

In order to reduce risk, I created a personal account with minimal rights within my Azure Devops dashboard.

How can I setup git to use this PAT without prompting for my Microsoft Account ?

Right now, each time a remote operation is triggered, a modal opens, asking for username/password. If I close it, it reopens. I close again and I can enter my PAT. This is working.

But if I trigger a new remote operation, same sequences occurs (have to close twice the credential dialog, then pasting the PAT).

How can I store the PAT definitively ?

FYI, I've ensure the correct helper is set within git global config, as suggested by the FAQ : git config credential.helper manager

I also tried to disable the credential helper with git config --system --unset credential.helper, but the issue is still present.

Another try was to use another helper : git config credential.helper store. Not better

FYI: I'm running on windows 2012R2, with the latest git version (git version 2.20.1.windows.1)

Upvotes: 1

Views: 4005

Answers (1)

jessehouwing
jessehouwing

Reputation: 115025

Edit your global git config and leave the helper empty.

 [credential]
      helper=

Then delete your credential from the Windows Credential store.

That should turn off the credential helper and revert to the default git behavior.

Upvotes: 1

Related Questions