Git-credential-manager-for-windows: Doesn't "Magically" Work for Me

Created on 16 Dec 2016  路  7Comments  路  Source: microsoft/Git-Credential-Manager-for-Windows

I cloned a repo from VS 2015.
I installed Git for Windows.
I installed this tool.
When I try to push/pull/clone new repo, I still get authentication failed.

How do I troubleshoot the installation?
I am not familiar with credential managers and how they work.

question

Most helpful comment

emptyAuth works a charm for me, definitely magic now! Thanks

All 7 comments

Git for Windows comes with this tool, a separate installation wasn't necessary.

As for checking if things are setup, from the command line run this commands:

git config --list --show-origin and look for a credential.helper=manager entry; additionally look for any credential.helper= entry as Git will try credential helpers in a series failing at the first one which claims to have valid credentials but doesn't.

setx GIT_TRACE C:\.gittrace this will instruct Git to log all activity to a file at "C:.gittrace". Feel free to redirect to any location on disk, but note that Git will not create any new folders and will silently fail if the folder doesn't exist.

setx GCM_TRACE C:\.gittrace this will instruct the GCM to log all activity to a file at "C:.gittrace". Feel free to redirect to any location on disk, but note that the GCM will not create any new folders and will silently fail if the folder doesn't exist.

Now attempt a push or fetch operation. If it fails, check the contents of the log file.

Feel free to post additional information here, and I'll happily help you diagnose/debug the issue.

I have the same issue - the lack of magic.

  1. Provision new build agent on Server 2016 for use with TFS 2017.
  2. Install git 2.11.0.windows.1
  3. git config --global credential.authority Windows
  4. Run git clone http://<host>:8080/tfs/<collection>/<project>/_git/<repo>
  5. fatal: Authentication failed error occurs.

Trace file

16:46:33.815099 git.c:371 trace: built-in: git 'clone' 'http://<host>:8080/tfs/<collection>/<project>/_git/<repo>' 16:46:33.861975 run-command.c:350 trace: run_command: 'git-remote-http' 'origin' 'http://<host>:8080/tfs/<collection>/<project>/_git/<repo>' 16:46:33.924480 run-command.c:350 trace: run_command: 'git credential-manager get' 16:46:34.002608 git.c:607 trace: exec: 'git-credential-manager' 'get' 16:46:34.002608 run-command.c:350 trace: run_command: 'git-credential-manager' 'get' 16:46:34.377645 run-command.c:350 trace: run_command: 'git credential-manager erase' 16:46:34.455774 git.c:607 trace: exec: 'git-credential-manager' 'erase' 16:46:34.455774 run-command.c:350 trace: run_command: 'git-credential-manager' 'erase'

I think the problem is the protocol. TFS allows you to run Git over HTTP. VS client works fine with that and provides credentialing. All other 3rd party tools expect HTTPS with a good (not self-signed) certificate.

If you look at how this Credential Manager works, it is looking for credential failures on HTTPS.

Please note that Git for Windows 2.10.2.windows.1 and 2.11.0.windows.1 no not work correctly with TFS. To make them work correctly, you'll need to git config --global http.emptyAuth true.

See https://github.com/git-for-windows/git/issues/987

emptyAuth works a charm for me, definitely magic now! Thanks

emptyAuth works a charm for me, definitely magic now! Thanks

Thanks for the confirmation. A fix for Git for Windows should arrive in 2.12.0 or earlier.

Fixed issue for me as well.

Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sirovermark picture sirovermark  路  3Comments

sebres picture sebres  路  3Comments

clairernovotny picture clairernovotny  路  7Comments

panuganti picture panuganti  路  4Comments

xt0rted picture xt0rted  路  5Comments