Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git bash on windows doesn't prompt in case github authentication is required and commands freeze indefinitely. #3284

Closed
1 task
sumanjitsg opened this issue Jun 21, 2021 · 4 comments

Comments

@sumanjitsg
Copy link

  • I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?

$ git --version --build-options

** git version 2.32.0.windows.1
cpu: x86_64
built from commit: 4c204998d0e156d13d81abe1d1963051b1418fc0
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon **
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

** Microsoft Windows [Version 10.0.19042.1052] **
  • What options did you set as part of the installation? Or did you choose the
    defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

** Editor Option: Notepad++
Custom Editor Path:
Default Branch Option: main
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: CRLFCommitAsIs
Bash Terminal Option: MinTTY
Git Pull Behavior Option: FFOnly
Use Credential Manager: Core
Performance Tweaks FSCache: Enabled
Enable Symlinks: Disabled
Enable Pseudo Console Support: Disabled
Enable FSMonitor: Disabled **
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?
** Issue isn't reproducible on Git Windows command line. It prompts for github authentication with two options (web/token). On successful authentication, commands start working on Git Windows and Git Bash as well. **

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other
** Bash **
** git pull, git push, git pull --rebase origin master **
  • What did you expect to occur after running these commands?
** Expected local branch updates from remote **
  • What actually happened instead?
** Commands freeze forever **
  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?
** insert URL here **
@sumanjitsg sumanjitsg changed the title Git bash on windows doesn't prompt in case github authentication is required and commands freeze forever. Git bash on windows doesn't prompt in case github authentication is required and commands freeze indefinitely. Jun 21, 2021
@dscho
Copy link
Member

dscho commented Jun 21, 2021

FWIW this strikes me as a problem with Git Credential Manager Core more than with Git, so I would like to suggest following the advice in https://github.com/microsoft/Git-Credential-Manager-Core/blob/main/docs/development.md#collect-trace-output to debug further.

@mjcheetham
Copy link
Member

@sumanjitsg can you try setting the following environment variables and re-running one of the commands that hangs?

GIT_TRACE=1
GCM_TRACE=1

For example from Git Bash:

$ GIT_TRACE=1 GCM_TRACE=1 git fetch

Please note that the trace output from GCM_TRACE may contain sensitive information like URLs and usernames. Please consider redacting any information before sharing.

@dscho
Copy link
Member

dscho commented Jun 21, 2021

@sumanjitsg just in case you are reading what Matthew and I are writing here: I was able to reproduce the issue and I think you can work around the issue until a full fix is released by calling the command with winpty, e.g. winpty git fetch.

@dscho
Copy link
Member

dscho commented Jun 21, 2021

@sumanjitsg please download and install https://github.com/microsoft/Git-Credential-Manager-Core/releases/tag/v2.0.475 to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants