After $git push -u origin main command, Git bash is not requesting any authentication literally does nothing

Update Oct. 2021:

issue 384 describes again the problem:

During the host provider auto-detection when GCM makes a HTTP call to the remote, this can sometimes hang until a long timeout period has elapsed.

This now has been fixed with PR 481 “Speed up host provider auto-detection and make more robust” (see commit 1f926e4)


Update July 2021:

Git for Windows 2.32.0(2) does include GCM (Git Credential Manager Core) v2.0.475.64295, which should solve the issue/PR 374 (“Fix bug where GUI prompts would not be shown on Windows”).


Original answer (June 2021):

Check your git config credential.helper to see if a caching mechanism would be the issue.

You should:

  • double-check our %PATH% (before opening a git bash), in order to reference C:\Program Files\Git\mingw64\libexec\git-core,
  • double-check what is stored in the Windows Credential Manager

you do that with:

 printf "host=github.com\nprotocol=https"|git-credential-manager get

If you see the wrong password, remove it with:

printf "host=github.com\nprotocol=https"|git-credential-manager erase

Repeat the erase command until you see a popup (do not enter your credentials then)

Then repeat your git push -u origin main, and enter your credentials to store them.

Note that git-for-windows/git issue 3268 points to microsoft/Git-Credential-Manager-Core issue 364.

As a temporary workaround:

git config --global credential.provider generic

Note that microsoft/Git-Credential-Manager-Core v2.0.475 has just been released to fix issue 364 with PR 375, in the context of Git 2.32 (May 2021).
The latest snapshot of Git for Windows should include that fix.

Leave a Comment