1

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)

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
Steve B
  • 36,818
  • 21
  • 101
  • 174
  • Try editing your global git config and set `[credential]helper=`, leave it empty. Then delete your credential from the Windows Credential store. – jessehouwing Feb 26 '19 at 10:03
  • @jessehouwing: it actually works. You should post this as an answer to get reward. That said, wht is puzzling me is that I don't have to type any password. Even if I delete stored credentials. Now, where PAT is supposed to be stored ? – Steve B Feb 26 '19 at 17:19
  • No clue... Are you logged on in windows with this account? – jessehouwing Feb 26 '19 at 20:33

1 Answers1

1

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.

jessehouwing
  • 106,458
  • 22
  • 256
  • 341