Git-credential-manager-for-windows: Repeatedly asks for Bitbucket password

Created on 13 Sep 2018  路  40Comments  路  Source: microsoft/Git-Credential-Manager-for-Windows

Me and my co-workers all get this error. I have an "app password" set up, which is just a token.

```PS C:\work\code[redacted][redacted]> git fetch
fatal: HttpRequestException encountered.
An error occurred while sending the request.
fatal: HttpRequestException encountered.
An error occurred while sending the request.
Password for 'https://[my_username]@bitbucket.org':
PS C:\work\code[redacted][redacted]>

git log output:
```11:26:28.599621 exec-cmd.c:236          trace: resolved executable dir: C:/Program Files/Git/mingw64/bin
11:26:28.599621 git.c:415               trace: built-in: git fetch
11:26:28.614484 run-command.c:637       trace: run_command: GIT_DIR=.git git remote-https origin https://[my_username]@bitbucket.org/[redacted]/[redacted].git
11:26:28.623367 exec-cmd.c:236          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
11:26:28.624406 git.c:654               trace: exec: git-remote-https origin https://[my_username]@bitbucket.org/[redacted]/[redacted].git
11:26:28.624406 run-command.c:637       trace: run_command: git-remote-https origin https://[my_username]@bitbucket.org/[redacted]/[redacted].git
11:26:28.632507 exec-cmd.c:236          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
11:26:29.004902 run-command.c:637       trace: run_command: 'git credential-manager get'
11:26:29.049780 exec-cmd.c:236          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
11:26:29.051774 git.c:654               trace: exec: git-credential-manager get
11:26:29.051774 run-command.c:637       trace: run_command: git-credential-manager get
11:26:29.117642 ...\Common.cs:665       trace: [Main] git-credential-manager (v1.16.2) 'get'
11:26:29.169410 ...\Git\Where.cs:343    trace: [FindGitInstallations] found 1 Git installation(s).
11:26:29.169410 ...Configuration.cs:222 trace: [LoadGitConfiguration] git All config read, 80 entries.
11:26:29.169410 ...\Common.cs:471       trace: [LoadOperationArguments] writeLog = 'True'.
11:26:29.169410 ...\Common.cs:479       trace: [LoadOperationArguments] modalPrompt = 'False'.
11:26:29.169410 ...\Common.cs:284       trace: [EnableTraceLogging] trace logging enabled.
11:26:29.179557 ...\Common.cs:289       trace: [EnableTraceLogging] git local config found at 'C:\work\code\[redacted]\[redacted]\.git\config'.
11:26:29.179557 ...\Common.cs:344       trace: [EnableTraceLoggingFile] trace log destination is 'C:\work\code\[redacted]\[redacted]\.git'.
11:26:29.202448 ...\Common.cs:84        trace: [CreateAuthentication] detecting authority type for 'https://[my_username]@bitbucket.org/'.
11:26:29.209493 ...uthentication.cs:319 trace: [GetAuthentication] authentication for Bitbucket created
11:26:29.209493 ...\Common.cs:173       trace: [CreateAuthentication] authority for 'https://[my_username]@bitbucket.org/'  is Bitbucket
11:26:29.220726 ...seSecureStore.cs:195 trace: [ReadCredentials] credentials for 'git:https://[my_username]@bitbucket.org' read from store.
11:26:29.220726 ...uthentication.cs:180 trace: [GetCredentials] successfully retrieved stored credentials, updating credential cache
11:26:29.228245 ...\Authority.cs:214    trace: [ValidateCredentials] authentication type = 'Credential'.
11:26:29.999881 ...\Git\Trace.cs:139    trace: [WriteException] ! error: 'An error occurred while sending the request.'.
11:26:30.000878 ...\Git\Trace.cs:143    trace: [WriteException]        > 'The underlying connection was closed: The connection was closed unexpectedly.'.
11:26:30.014838 ...\Common.cs:630       trace: [LogEvent] System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: The connection was closed unexpectedly.
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Alm.Authentication.Network.<HttpGetAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Atlassian.Bitbucket.Authentication.Rest.RestClient.<TryGetUser>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Atlassian.Bitbucket.Authentication.Authority.<ValidateCredentials>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Atlassian.Bitbucket.Authentication.Authority.<ValidateCredentials>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Atlassian.Bitbucket.Authentication.Authentication.<ValidateCredentials>d__33.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Alm.Cli.CommonFunctions.<QueryCredentials>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Alm.Cli.Program.<>c__DisplayClass23_1.<<Get>b__0>d.MoveNext()
11:26:30.019824 ...\Program.cs:578      trace: [Run] fatal: HttpRequestException encountered.
   An error occurred while sending the request.
11:26:30.053732 run-command.c:637       trace: run_command: 'git credential-manager get'
11:26:30.081889 exec-cmd.c:236          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
11:26:30.083884 git.c:654               trace: exec: git-credential-manager get
11:26:30.083884 run-command.c:637       trace: run_command: git-credential-manager get
11:26:30.134779 ...\Common.cs:665       trace: [Main] git-credential-manager (v1.16.2) 'get'
11:26:30.182585 ...\Git\Where.cs:343    trace: [FindGitInstallations] found 1 Git installation(s).
11:26:30.182585 ...Configuration.cs:222 trace: [LoadGitConfiguration] git All config read, 80 entries.
11:26:30.182585 ...\Common.cs:471       trace: [LoadOperationArguments] writeLog = 'True'.
11:26:30.182585 ...\Common.cs:479       trace: [LoadOperationArguments] modalPrompt = 'False'.
11:26:30.182585 ...\Common.cs:284       trace: [EnableTraceLogging] trace logging enabled.
11:26:30.182585 ...\Common.cs:289       trace: [EnableTraceLogging] git local config found at 'C:\work\code\[redacted]\[redacted]\.git\config'.
11:26:30.182585 ...\Common.cs:344       trace: [EnableTraceLoggingFile] trace log destination is 'C:\work\code\[redacted]\[redacted]\.git'.
11:26:30.215992 ...\Common.cs:84        trace: [CreateAuthentication] detecting authority type for 'https://[my_username]@bitbucket.org/'.
11:26:30.224057 ...uthentication.cs:319 trace: [GetAuthentication] authentication for Bitbucket created
11:26:30.224057 ...\Common.cs:173       trace: [CreateAuthentication] authority for 'https://[my_username]@bitbucket.org/'  is Bitbucket
11:26:30.232603 ...seSecureStore.cs:195 trace: [ReadCredentials] credentials for 'git:https://[my_username]@bitbucket.org' read from store.
11:26:30.232603 ...uthentication.cs:180 trace: [GetCredentials] successfully retrieved stored credentials, updating credential cache
11:26:30.232603 ...\Authority.cs:214    trace: [ValidateCredentials] authentication type = 'Credential'.
11:26:30.994240 ...\Git\Trace.cs:139    trace: [WriteException] ! error: 'An error occurred while sending the request.'.
11:26:30.994240 ...\Git\Trace.cs:143    trace: [WriteException]        > 'The underlying connection was closed: The connection was closed unexpectedly.'.
11:26:31.005209 ...\Common.cs:630       trace: [LogEvent] System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: The connection was closed unexpectedly.
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Alm.Authentication.Network.<HttpGetAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Atlassian.Bitbucket.Authentication.Rest.RestClient.<TryGetUser>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Atlassian.Bitbucket.Authentication.Authority.<ValidateCredentials>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Atlassian.Bitbucket.Authentication.Authority.<ValidateCredentials>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Atlassian.Bitbucket.Authentication.Authentication.<ValidateCredentials>d__33.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Alm.Cli.CommonFunctions.<QueryCredentials>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Alm.Cli.Program.<>c__DisplayClass23_1.<<Get>b__0>d.MoveNext()
11:26:31.010195 ...\Program.cs:578      trace: [Run] fatal: HttpRequestException encountered.
   An error occurred while sending the request.
11:26:31.050087 run-command.c:637       trace: run_command: bash -c 'test "a$SHELL" '\!'= "a${SHELL%.exe}" || exit 127; cat >/dev/tty && read -r -s line </dev/tty && echo "$line" && echo >/dev/tty'
11:26:39.465722 exec-cmd.c:236          trace: resolved executable dir: C:/Program Files/Git/mingw64/bin
11:26:39.465722 git.c:415               trace: built-in: git fetch
11:26:39.482751 run-command.c:637       trace: run_command: GIT_DIR=.git git remote-https origin https://[my_username]@bitbucket.org/[redacted]/[redacted].git
11:26:39.490780 exec-cmd.c:236          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
11:26:39.490780 git.c:654               trace: exec: git-remote-https origin https://[my_username]@bitbucket.org/[redacted]/[redacted].git
11:26:39.490780 run-command.c:637       trace: run_command: git-remote-https origin https://[my_username]@bitbucket.org/[redacted]/[redacted].git
11:26:39.501205 exec-cmd.c:236          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
11:26:39.929360 run-command.c:637       trace: run_command: 'git credential-manager get'
11:26:39.964580 exec-cmd.c:236          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
11:26:39.965576 git.c:654               trace: exec: git-credential-manager get
11:26:39.965576 run-command.c:637       trace: run_command: git-credential-manager get
11:26:40.029370 ...\Common.cs:665       trace: [Main] git-credential-manager (v1.16.2) 'get'
11:26:40.079238 ...\Git\Where.cs:343    trace: [FindGitInstallations] found 1 Git installation(s).
11:26:40.083226 ...Configuration.cs:222 trace: [LoadGitConfiguration] git All config read, 80 entries.
11:26:40.086217 ...\Common.cs:471       trace: [LoadOperationArguments] writeLog = 'True'.
11:26:40.086217 ...\Common.cs:479       trace: [LoadOperationArguments] modalPrompt = 'False'.
11:26:40.087215 ...\Common.cs:284       trace: [EnableTraceLogging] trace logging enabled.
11:26:40.088213 ...\Common.cs:289       trace: [EnableTraceLogging] git local config found at 'C:\work\code\[redacted]\[redacted]\.git\config'.
11:26:40.089209 ...\Common.cs:344       trace: [EnableTraceLoggingFile] trace log destination is 'C:\work\code\[redacted]\[redacted]\.git'.
11:26:40.112174 ...\Common.cs:84        trace: [CreateAuthentication] detecting authority type for 'https://[my_username]@bitbucket.org/'.
11:26:40.123251 ...uthentication.cs:319 trace: [GetAuthentication] authentication for Bitbucket created
11:26:40.123251 ...\Common.cs:173       trace: [CreateAuthentication] authority for 'https://[my_username]@bitbucket.org/'  is Bitbucket
11:26:40.130297 ...seSecureStore.cs:195 trace: [ReadCredentials] credentials for 'git:https://[my_username]@bitbucket.org' read from store.
11:26:40.130297 ...uthentication.cs:180 trace: [GetCredentials] successfully retrieved stored credentials, updating credential cache
11:26:40.133341 ...\Authority.cs:214    trace: [ValidateCredentials] authentication type = 'Credential'.
11:26:40.895404 ...\Git\Trace.cs:139    trace: [WriteException] ! error: 'An error occurred while sending the request.'.
11:26:40.895404 ...\Git\Trace.cs:143    trace: [WriteException]        > 'The underlying connection was closed: The connection was closed unexpectedly.'.
11:26:40.900390 ...\Common.cs:630       trace: [LogEvent] System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: The connection was closed unexpectedly.
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Alm.Authentication.Network.<HttpGetAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Atlassian.Bitbucket.Authentication.Rest.RestClient.<TryGetUser>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Atlassian.Bitbucket.Authentication.Authority.<ValidateCredentials>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Atlassian.Bitbucket.Authentication.Authority.<ValidateCredentials>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Atlassian.Bitbucket.Authentication.Authentication.<ValidateCredentials>d__33.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Alm.Cli.CommonFunctions.<QueryCredentials>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Alm.Cli.Program.<>c__DisplayClass23_1.<<Get>b__0>d.MoveNext()
11:26:40.902385 ...\Program.cs:578      trace: [Run] fatal: HttpRequestException encountered.
   An error occurred while sending the request.
11:26:40.951956 run-command.c:637       trace: run_command: 'git credential-manager get'
11:26:40.997388 exec-cmd.c:236          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
11:26:40.999383 git.c:654               trace: exec: git-credential-manager get
11:26:40.999383 run-command.c:637       trace: run_command: git-credential-manager get
11:26:41.073836 ...\Common.cs:665       trace: [Main] git-credential-manager (v1.16.2) 'get'
11:26:41.125699 ...\Git\Where.cs:343    trace: [FindGitInstallations] found 1 Git installation(s).
11:26:41.129719 ...Configuration.cs:222 trace: [LoadGitConfiguration] git All config read, 80 entries.
11:26:41.132678 ...\Common.cs:471       trace: [LoadOperationArguments] writeLog = 'True'.
11:26:41.132678 ...\Common.cs:479       trace: [LoadOperationArguments] modalPrompt = 'False'.
11:26:41.133709 ...\Common.cs:284       trace: [EnableTraceLogging] trace logging enabled.
11:26:41.133709 ...\Common.cs:289       trace: [EnableTraceLogging] git local config found at 'C:\work\code\[redacted]\[redacted]\.git\config'.
11:26:41.134707 ...\Common.cs:344       trace: [EnableTraceLoggingFile] trace log destination is 'C:\work\code\[redacted]\[redacted]\.git'.
11:26:41.159338 ...\Common.cs:84        trace: [CreateAuthentication] detecting authority type for 'https://[my_username]@bitbucket.org/'.
11:26:41.170327 ...uthentication.cs:319 trace: [GetAuthentication] authentication for Bitbucket created
11:26:41.170327 ...\Common.cs:173       trace: [CreateAuthentication] authority for 'https://[my_username]@bitbucket.org/'  is Bitbucket
11:26:41.181281 ...seSecureStore.cs:195 trace: [ReadCredentials] credentials for 'git:https://[my_username]@bitbucket.org' read from store.
11:26:41.181281 ...uthentication.cs:180 trace: [GetCredentials] successfully retrieved stored credentials, updating credential cache
11:26:41.186310 ...\Authority.cs:214    trace: [ValidateCredentials] authentication type = 'Credential'.
11:26:41.982606 ...\Git\Trace.cs:139    trace: [WriteException] ! error: 'An error occurred while sending the request.'.
11:26:41.983603 ...\Git\Trace.cs:143    trace: [WriteException]        > 'The underlying connection was closed: The connection was closed unexpectedly.'.
11:26:41.988590 ...\Common.cs:630       trace: [LogEvent] System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: The connection was closed unexpectedly.
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Alm.Authentication.Network.<HttpGetAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Atlassian.Bitbucket.Authentication.Rest.RestClient.<TryGetUser>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Atlassian.Bitbucket.Authentication.Authority.<ValidateCredentials>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Atlassian.Bitbucket.Authentication.Authority.<ValidateCredentials>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Atlassian.Bitbucket.Authentication.Authentication.<ValidateCredentials>d__33.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Alm.Cli.CommonFunctions.<QueryCredentials>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Alm.Cli.Program.<>c__DisplayClass23_1.<<Get>b__0>d.MoveNext()
11:26:41.991581 ...\Program.cs:578      trace: [Run] fatal: HttpRequestException encountered.
   An error occurred while sending the request.
11:26:42.037458 run-command.c:637       trace: run_command: bash -c 'test "a$SHELL" '\!'= "a${SHELL%.exe}" || exit 127; cat >/dev/tty && read -r -s line </dev/tty && echo "$line" && echo >/dev/tty'
11:26:44.820520 run-command.c:637       trace: run_command: 'git credential-manager store'
11:26:44.893220 exec-cmd.c:236          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
11:26:44.894219 git.c:654               trace: exec: git-credential-manager store
11:26:44.894219 run-command.c:637       trace: run_command: git-credential-manager store
11:26:44.944848 ...\Common.cs:665       trace: [Main] git-credential-manager (v1.16.2) 'store'
11:26:45.009981 ...\Git\Where.cs:343    trace: [FindGitInstallations] found 1 Git installation(s).
11:26:45.012975 ...Configuration.cs:222 trace: [LoadGitConfiguration] git All config read, 80 entries.
11:26:45.015965 ...\Common.cs:471       trace: [LoadOperationArguments] writeLog = 'True'.
11:26:45.015965 ...\Common.cs:479       trace: [LoadOperationArguments] modalPrompt = 'False'.
11:26:45.016962 ...\Common.cs:284       trace: [EnableTraceLogging] trace logging enabled.
11:26:45.017959 ...\Common.cs:289       trace: [EnableTraceLogging] git local config found at 'C:\work\code\[redacted]\[redacted]\.git\config'.
11:26:45.018957 ...\Common.cs:344       trace: [EnableTraceLoggingFile] trace log destination is 'C:\work\code\[redacted]\[redacted]\.git'.
11:26:45.027933 ...\Common.cs:84        trace: [CreateAuthentication] detecting authority type for 'https://[my_username]@bitbucket.org/'.
11:26:45.037906 ...uthentication.cs:319 trace: [GetAuthentication] authentication for Bitbucket created
11:26:45.037906 ...\Common.cs:173       trace: [CreateAuthentication] authority for 'https://[my_username]@bitbucket.org/'  is Bitbucket
11:26:45.037906 ...\Program.cs:493      trace: [Store] storing Bitbucket credentials for 'https://[my_username]@bitbucket.org/'.
11:26:45.046882 ...seSecureStore.cs:195 trace: [ReadCredentials] credentials for 'git:https://[my_username]@bitbucket.org' read from store.
11:26:45.046882 ...uthentication.cs:180 trace: [GetCredentials] successfully retrieved stored credentials, updating credential cache
11:26:45.048877 ...uthentication.cs:258 trace: [SetCredentials] [my_username] at https://[my_username]@bitbucket.org/
11:26:45.058085 ...seSecureStore.cs:286 trace: [WriteCredential] credentials for 'git:https://[my_username]@bitbucket.org' written to store.
11:26:45.071050 run-command.c:637       trace: run_command: 'git credential-manager store'
11:26:45.094986 exec-cmd.c:236          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
11:26:45.095983 git.c:654               trace: exec: git-credential-manager store
11:26:45.095983 run-command.c:637       trace: run_command: git-credential-manager store
11:26:45.140161 ...\Common.cs:665       trace: [Main] git-credential-manager (v1.16.2) 'store'
11:26:45.195344 ...\Git\Where.cs:343    trace: [FindGitInstallations] found 1 Git installation(s).
11:26:45.198294 ...Configuration.cs:222 trace: [LoadGitConfiguration] git All config read, 80 entries.
11:26:45.200328 ...\Common.cs:471       trace: [LoadOperationArguments] writeLog = 'True'.
11:26:45.200328 ...\Common.cs:479       trace: [LoadOperationArguments] modalPrompt = 'False'.
11:26:45.200328 ...\Common.cs:284       trace: [EnableTraceLogging] trace logging enabled.
11:26:45.200328 ...\Common.cs:289       trace: [EnableTraceLogging] git local config found at 'C:\work\code\[redacted]\[redacted]\.git\config'.
11:26:45.200328 ...\Common.cs:344       trace: [EnableTraceLoggingFile] trace log destination is 'C:\work\code\[redacted]\[redacted]\.git'.
11:26:45.210344 ...\Common.cs:84        trace: [CreateAuthentication] detecting authority type for 'https://[my_username]@bitbucket.org/'.
11:26:45.220222 ...uthentication.cs:319 trace: [GetAuthentication] authentication for Bitbucket created
11:26:45.220222 ...\Common.cs:173       trace: [CreateAuthentication] authority for 'https://[my_username]@bitbucket.org/'  is Bitbucket
11:26:45.220222 ...\Program.cs:493      trace: [Store] storing Bitbucket credentials for 'https://[my_username]@bitbucket.org/'.
11:26:45.230183 ...seSecureStore.cs:195 trace: [ReadCredentials] credentials for 'git:https://[my_username]@bitbucket.org' read from store.
11:26:45.230183 ...uthentication.cs:180 trace: [GetCredentials] successfully retrieved stored credentials, updating credential cache
11:26:45.230183 ...uthentication.cs:258 trace: [SetCredentials] [my_username] at https://[my_username]@bitbucket.org/
11:26:45.247385 ...seSecureStore.cs:286 trace: [WriteCredential] credentials for 'git:https://[my_username]@bitbucket.org' written to store.
11:26:45.261794 run-command.c:637       trace: run_command: git rev-list --objects --stdin --not --all --quiet
11:26:45.270577 exec-cmd.c:236          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
11:26:45.271576 git.c:415               trace: built-in: git rev-list --objects --stdin --not --all --quiet
11:26:45.290378 run-command.c:637       trace: run_command: git rev-list --objects --stdin --not --all --quiet
11:26:45.300279 exec-cmd.c:236          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
11:26:45.300279 git.c:415               trace: built-in: git rev-list --objects --stdin --not --all --quiet
11:26:45.330301 run-command.c:1553      run_processes_parallel: preparing to run up to 1 tasks
11:26:45.330301 run-command.c:1585      run_processes_parallel: done
11:26:45.330301 run-command.c:637       trace: run_command: git gc --auto
11:26:45.340385 exec-cmd.c:236          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
11:26:45.340385 git.c:415               trace: built-in: git gc --auto

I've looked through the other Bitbucket issues and haven't found a solution

Most helpful comment

8 days later - still no popup! This seems to do it.

18.205.93.0 bitbucket.org
18.205.93.7     api.bitbucket.org

All 40 comments

Looks like v1.16.2, which is/was broken. Please upgrade to v1.16.3 or v1.17.2 for the fix.

Looks like v1.16.2, which is/was broken. Please upgrade to v1.16.3 or v1.17.2 for the fix.

Where v1.17.2

Looks like v1.16.2, which is/was broken. Please upgrade to v1.16.3 or v1.17.2 for the fix.

I'm running v1.17.1, which is the latest I have found. I don't see a version 1.17.2

Looks like v1.16.2, which is/was broken. Please upgrade to v1.16.3 or v1.17.2 for the fix.

I'm running v1.17.1, which is the latest I have found. I don't see a version 1.17.2

may be he mistakenly write 1.17.2

It still doesn't work though

On Sep 16, 2018, 8:17 PM, at 8:17 PM, Ahmed Said notifications@github.com wrote:

Looks like v1.16.2, which is/was broken. Please upgrade to v1.16.3
or v1.17.2 for the fix.

I'm running v1.17.1, which is the latest I have found. I don't see a
version 1.17.2

may be he mistakenly write 1.17.2

--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
https://github.com/Microsoft/Git-Credential-Manager-for-Windows/issues/751#issuecomment-421858319

Having the same problem today. Calls to bitbucket just time out here.

https://github.com/Microsoft/Git-Credential-Manager-for-Windows/blob/430bc00458c16dfbbd7635b70288502998a3eea0/Microsoft.Alm.Authentication/Src/Network.cs#L373

I tried the same call with curl and it worked fine. Had no problems for more than a week until today. Could it be update Tuesday? I guess I'll just reboot.

I'm seeing this too - for weeks, ever since switching to Windows from macOS. Nothing in the readme works as described. How do I get this to stop asking me (usually 2 or 3 times per push/pull) to enter my password? As far as I can tell I'm running the latest version of everything. Should I be using some beta version and giving everything root access to my system (which seems normal on Windows...)?

There must be something wrong at the system level. I notice this problem when computer resumes from hibernation. After restart everything is fine. Used to have the same problem with Edge too. No problems with Edge now.

There must be something wrong at the system level.

It's so wide open! What can be done to diagnose and fix it? Is the problem that I'm not using Edge as my default browser (I have suspected that that could be a problem for other reasons). I updated everything to the latest versions (again) and now I get the login prompt for BitBucket/Atlassian less often, but I'm still getting it.

Edge has nothing to do with it. I only speculate that Edge had the same problem and it was somehow fixed. In GIT cred manager case HttpClient.GetAsync call just times out when credential manager tries to contact bitbucket. After timeout it just assumes that password was bad and asks for it again.
I also looked at framework reference source but did not find any clues there either.

Now I think that there are two problems. First is that unexplainable HttpClient.GetAsync issue.
The second one is weird logic that interprets network problem the same way as failed credential check. This is the one thing driving people nuts!

I Ctrl+C if there's a problem and rerun the last command. It tends to successfully load the credentials for some reason. This isn't ideal, but it seems to work for fetch, pull, and push.

I am hoping that bumping the timeout a la #763 will let the auth cycle finish the first time.

I tried playing with timeouts but even 35 seconds did not help. Same query from browser replied in less than a second.

With very high degree of certainty I believe that the root cause of this problem is use of VPN. Browsers have no problem but cred manager does. Still asking for password after each timeout is rude.
Opened new issue #765 about this.

Just a note - some of us are using this with GUI tools like SourceTree - and it's even more baffling there, since there's no feedback in any terminal. We just get the same login screen again and again. I did with the latest update finally get some of the redirects (to some localhost URL) to work, where they previously did not work. But it still can't seem to remember my login for BitBucket (GitHub is working, thankfully).

There is a "show full output" checkbox on the push window in SourceTree. Chech it to see some output. Not much by default but your can always compile GCM in debug mode and see more. Not really helpful for this problem though.

You can use setx GCM_TRACE=<path_to_file> to have the GCM log all trace information into a file of your choosing. Of course, you'll need to restart any open console or IDE which rely on Git to propagate the environment change.

Any news? Utterly broken for me.

17:47:26.244311 ...\Common.cs:677       trace: [Main] git-credential-manager (v1.17.2) 'deploy', '--passive', '--nofail'
17:47:26.248316 ...\Installer.cs:98     trace: [.ctor] --passive = true.
17:47:26.280323 ...\Git\Where.cs:361    trace: [FindGitInstallations] found 1 Git installation(s).
17:47:26.282324 ...\Installer.cs:816    trace: [CleanFiles] clean 'C:\Program Files\Git\mingw64\libexec\git-core\Bitbucket.Authentication.dll'.
17:47:26.282324 ...\Installer.cs:816    trace: [CleanFiles] clean 'C:\Program Files\Git\mingw64\libexec\git-core\git-askpass.exe'.
17:47:26.282324 ...\Installer.cs:816    trace: [CleanFiles] clean 'C:\Program Files\Git\mingw64\libexec\git-core\git-credential-manager.exe'.
17:47:26.283345 ...\Installer.cs:816    trace: [CleanFiles] clean 'C:\Program Files\Git\mingw64\libexec\git-core\GitHub.Authentication.exe'.
17:47:26.283345 ...\Installer.cs:816    trace: [CleanFiles] clean 'C:\Program Files\Git\mingw64\libexec\git-core\Microsoft.Alm.Authentication.dll'.
17:47:26.283345 ...\Installer.cs:816    trace: [CleanFiles] clean 'C:\Program Files\Git\mingw64\libexec\git-core\Microsoft.Alm.Git.dll'.
17:47:26.283345 ...\Installer.cs:816    trace: [CleanFiles] clean 'C:\Program Files\Git\mingw64\libexec\git-core\Microsoft.IdentityModel.Clients.ActiveDirectory.dll'.
17:47:26.284323 ...\Installer.cs:816    trace: [CleanFiles] clean 'C:\Program Files\Git\mingw64\libexec\git-core\Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll'.
17:47:26.284323 ...\Installer.cs:816    trace: [CleanFiles] clean 'C:\Program Files\Git\mingw64\libexec\git-core\Microsoft.Vsts.Authentication.dll'.
17:47:26.284323 ...\Installer.cs:816    trace: [CleanFiles] clean 'C:\Program Files\Git\mingw64\libexec\git-core\VisualStudioTeamServices.Authentication.dll'.
17:47:26.284323 ...\Installer.cs:292    trace: [DeployConsole] removed previous installation from 'C:\Program Files\Git\mingw64\libexec\git-core'.
17:47:26.285322 ...\Installer.cs:851    trace: [CopyFiles] copy 'Bitbucket.Authentication.dll' from 'C:\Users\Oliver\AppData\Local\Programs\Microsoft Git Credential Manager for Windows' to 'C:\Program Files\Git\mingw64\libexec\git-core'.
17:47:26.288561 ...\Installer.cs:851    trace: [CopyFiles] copy 'git-askpass.exe' from 'C:\Users\Oliver\AppData\Local\Programs\Microsoft Git Credential Manager for Windows' to 'C:\Program Files\Git\mingw64\libexec\git-core'.
17:47:26.335572 ...\Installer.cs:851    trace: [CopyFiles] copy 'git-credential-manager.exe' from 'C:\Users\Oliver\AppData\Local\Programs\Microsoft Git Credential Manager for Windows' to 'C:\Program Files\Git\mingw64\libexec\git-core'.
17:47:26.337574 ...\Installer.cs:851    trace: [CopyFiles] copy 'GitHub.Authentication.exe' from 'C:\Users\Oliver\AppData\Local\Programs\Microsoft Git Credential Manager for Windows' to 'C:\Program Files\Git\mingw64\libexec\git-core'.
17:47:26.338596 ...\Installer.cs:851    trace: [CopyFiles] copy 'Microsoft.Alm.Authentication.dll' from 'C:\Users\Oliver\AppData\Local\Programs\Microsoft Git Credential Manager for Windows' to 'C:\Program Files\Git\mingw64\libexec\git-core'.
17:47:26.339563 ...\Installer.cs:851    trace: [CopyFiles] copy 'Microsoft.IdentityModel.Clients.ActiveDirectory.dll' from 'C:\Users\Oliver\AppData\Local\Programs\Microsoft Git Credential Manager for Windows' to 'C:\Program Files\Git\mingw64\libexec\git-core'.
17:47:26.381574 ...\Installer.cs:851    trace: [CopyFiles] copy 'VisualStudioTeamServices.Authentication.dll' from 'C:\Users\Oliver\AppData\Local\Programs\Microsoft Git Credential Manager for Windows' to 'C:\Program Files\Git\mingw64\libexec\git-core'.
17:47:26.383561 ...\Installer.cs:851    trace: [CopyFiles] copy 'git-askpass.html' from 'C:\Users\Oliver\AppData\Local\Programs\Microsoft Git Credential Manager for Windows' to 'C:\Program Files\Git\mingw64\share\doc\git-doc'.
17:47:26.389574 ...\Installer.cs:851    trace: [CopyFiles] copy 'git-credential-manager.html' from 'C:\Users\Oliver\AppData\Local\Programs\Microsoft Git Credential Manager for Windows' to 'C:\Program Files\Git\mingw64\share\doc\git-doc'.
17:47:26.396572 ...\Common.cs:642       trace: [LogEvent] Deployment to 'C:\Program Files\Git' succeeded.
17:47:26.398576 ...\Installer.cs:202    trace: [UserBinPath] user bin found at 'C:\Users\Oliver\bin'.
17:47:26.398576 ...\Installer.cs:816    trace: [CleanFiles] clean 'C:\Users\Oliver\bin\Bitbucket.Authentication.dll'.
17:47:26.398576 ...\Installer.cs:816    trace: [CleanFiles] clean 'C:\Users\Oliver\bin\git-askpass.exe'.
17:47:26.398576 ...\Installer.cs:816    trace: [CleanFiles] clean 'C:\Users\Oliver\bin\git-credential-manager.exe'.
17:47:26.399578 ...\Installer.cs:816    trace: [CleanFiles] clean 'C:\Users\Oliver\bin\GitHub.Authentication.exe'.
17:47:26.399578 ...\Installer.cs:816    trace: [CleanFiles] clean 'C:\Users\Oliver\bin\Microsoft.Alm.Authentication.dll'.
17:47:26.399578 ...\Installer.cs:816    trace: [CleanFiles] clean 'C:\Users\Oliver\bin\Microsoft.Alm.Git.dll'.
17:47:26.399578 ...\Installer.cs:816    trace: [CleanFiles] clean 'C:\Users\Oliver\bin\Microsoft.IdentityModel.Clients.ActiveDirectory.dll'.
17:47:26.400579 ...\Installer.cs:816    trace: [CleanFiles] clean 'C:\Users\Oliver\bin\Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll'.
17:47:26.400579 ...\Installer.cs:816    trace: [CleanFiles] clean 'C:\Users\Oliver\bin\Microsoft.Vsts.Authentication.dll'.
17:47:26.400579 ...\Installer.cs:816    trace: [CleanFiles] clean 'C:\Users\Oliver\bin\VisualStudioTeamServices.Authentication.dll'.
17:47:26.400579 ...\Installer.cs:345    trace: [DeployConsole] removed previous installation from 'C:\Users\Oliver\bin'.
17:47:26.400579 ...\Installer.cs:851    trace: [CopyFiles] copy 'Bitbucket.Authentication.dll' from 'C:\Users\Oliver\AppData\Local\Programs\Microsoft Git Credential Manager for Windows' to 'C:\Users\Oliver\bin'.
17:47:26.401573 ...\Installer.cs:851    trace: [CopyFiles] copy 'git-askpass.exe' from 'C:\Users\Oliver\AppData\Local\Programs\Microsoft Git Credential Manager for Windows' to 'C:\Users\Oliver\bin'.
17:47:26.403562 ...\Installer.cs:851    trace: [CopyFiles] copy 'git-credential-manager.exe' from 'C:\Users\Oliver\AppData\Local\Programs\Microsoft Git Credential Manager for Windows' to 'C:\Users\Oliver\bin'.
17:47:26.404578 ...\Installer.cs:851    trace: [CopyFiles] copy 'GitHub.Authentication.exe' from 'C:\Users\Oliver\AppData\Local\Programs\Microsoft Git Credential Manager for Windows' to 'C:\Users\Oliver\bin'.
17:47:26.405562 ...\Installer.cs:851    trace: [CopyFiles] copy 'Microsoft.Alm.Authentication.dll' from 'C:\Users\Oliver\AppData\Local\Programs\Microsoft Git Credential Manager for Windows' to 'C:\Users\Oliver\bin'.
17:47:26.406579 ...\Installer.cs:851    trace: [CopyFiles] copy 'Microsoft.IdentityModel.Clients.ActiveDirectory.dll' from 'C:\Users\Oliver\AppData\Local\Programs\Microsoft Git Credential Manager for Windows' to 'C:\Users\Oliver\bin'.
17:47:26.408562 ...\Installer.cs:851    trace: [CopyFiles] copy 'VisualStudioTeamServices.Authentication.dll' from 'C:\Users\Oliver\AppData\Local\Programs\Microsoft Git Credential Manager for Windows' to 'C:\Users\Oliver\bin'.
17:47:26.409562 ...\Installer.cs:851    trace: [CopyFiles] copy 'git-askpass.html' from 'C:\Users\Oliver\AppData\Local\Programs\Microsoft Git Credential Manager for Windows' to 'C:\Users\Oliver\bin'.
17:47:26.411567 ...\Installer.cs:851    trace: [CopyFiles] copy 'git-credential-manager.html' from 'C:\Users\Oliver\AppData\Local\Programs\Microsoft Git Credential Manager for Windows' to 'C:\Users\Oliver\bin'.
17:47:26.413567 ...\Common.cs:642       trace: [LogEvent] Deployment to 'C:\Users\Oliver\bin' succeeded.
17:47:26.420578 ...\Installer.cs:730    trace: [SetGitConfig] action = 'Set'.
17:47:26.422578 ...\Installer.cs:968    trace: [ExecuteGit] create process: cmd 'C:\Program Files\Git\cmd\git.exe' 'config --global credential.helper manager' .
17:47:26.526386 ...\Installer.cs:974    trace: [ExecuteGit] Git exited with 0.
17:47:26.526386 ...\Installer.cs:750    trace: [SetGitConfig] updating ~/.gitconfig succeeded.
17:47:26.526386 ...\Common.cs:642       trace: [LogEvent] Git Credential Manager for Windows v1.17.2 successfully deployed.
17:47:26.529387 ...\Program.cs:330      trace: [Deploy] Installer result = 'Success', exit code = 0.
18:11:08.367623 ...\Common.cs:665       trace: [Main] git-credential-manager (v1.16.2) 'get'
18:11:08.422635 ...\Git\Where.cs:343    trace: [FindGitInstallations] found 1 Git installation(s).
18:11:08.426637 ...Configuration.cs:222 trace: [LoadGitConfiguration] git All config read, 42 entries.
18:11:08.455622 ...\Common.cs:84        trace: [CreateAuthentication] detecting authority type for 'https://bitbucket.org/'.
18:11:08.467637 ...uthentication.cs:319 trace: [GetAuthentication] authentication for Bitbucket created
18:11:08.467637 ...\Common.cs:173       trace: [CreateAuthentication] authority for 'https://bitbucket.org/'  is Bitbucket
18:11:08.559625 ...icationPrompts.cs:96 trace: [CredentialModalPrompt] prompting user for credentials.
18:11:19.752677 ...\Authority.cs:128    trace: [AcquireToken] basic authentication failed [An error occurred while sending the request.]
18:11:19.757674 ...uthentication.cs:393 trace: [InteractiveLogon] interactive logon failed
18:11:19.781683 ...\Authority.cs:214    trace: [ValidateCredentials] authentication type = 'Credential'.
18:11:21.827255 ...\Git\Trace.cs:139    trace: [WriteException] ! error: 'An error occurred while sending the request.'.
18:11:21.827255 ...\Git\Trace.cs:143    trace: [WriteException]        > 'The underlying connection was closed: The connection was closed unexpectedly.'.
18:11:21.843256 ...\Common.cs:630       trace: [LogEvent] System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: The connection was closed unexpectedly.
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Alm.Authentication.Network.<HttpGetAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Atlassian.Bitbucket.Authentication.Rest.RestClient.<TryGetUser>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Atlassian.Bitbucket.Authentication.Authority.<ValidateCredentials>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Atlassian.Bitbucket.Authentication.Authority.<ValidateCredentials>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Atlassian.Bitbucket.Authentication.Authentication.<ValidateCredentials>d__33.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Alm.Cli.CommonFunctions.<QueryCredentials>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Alm.Cli.Program.<>c__DisplayClass23_1.<<Get>b__0>d.MoveNext()
18:11:21.851257 ...\Program.cs:578      trace: [Run] fatal: HttpRequestException encountered.
   An error occurred while sending the request.
18:11:22.398324 ...\Common.cs:665       trace: [Main] git-credential-manager (v1.16.2) 'get'
18:11:22.451586 ...\Git\Where.cs:343    trace: [FindGitInstallations] found 1 Git installation(s).
18:11:22.454586 ...Configuration.cs:222 trace: [LoadGitConfiguration] git All config read, 42 entries.
18:11:22.481570 ...\Common.cs:84        trace: [CreateAuthentication] detecting authority type for 'https://bitbucket.org/'.
18:11:22.493582 ...uthentication.cs:319 trace: [GetAuthentication] authentication for Bitbucket created
18:11:22.493582 ...\Common.cs:173       trace: [CreateAuthentication] authority for 'https://bitbucket.org/'  is Bitbucket
18:11:22.569575 ...icationPrompts.cs:96 trace: [CredentialModalPrompt] prompting user for credentials.
18:11:31.604336 ...\Authority.cs:128    trace: [AcquireToken] basic authentication failed [An error occurred while sending the request.]
18:11:31.619343 ...uthentication.cs:393 trace: [InteractiveLogon] interactive logon failed
18:11:31.649329 ...\Authority.cs:214    trace: [ValidateCredentials] authentication type = 'Credential'.
18:11:33.714044 ...\Git\Trace.cs:139    trace: [WriteException] ! error: 'An error occurred while sending the request.'.
18:11:33.714044 ...\Git\Trace.cs:143    trace: [WriteException]        > 'The underlying connection was closed: The connection was closed unexpectedly.'.
18:11:33.729044 ...\Common.cs:630       trace: [LogEvent] System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: The connection was closed unexpectedly.
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Alm.Authentication.Network.<HttpGetAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Atlassian.Bitbucket.Authentication.Rest.RestClient.<TryGetUser>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Atlassian.Bitbucket.Authentication.Authority.<ValidateCredentials>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Atlassian.Bitbucket.Authentication.Authority.<ValidateCredentials>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Atlassian.Bitbucket.Authentication.Authentication.<ValidateCredentials>d__33.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Alm.Cli.CommonFunctions.<QueryCredentials>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Alm.Cli.Program.<>c__DisplayClass23_1.<<Get>b__0>d.MoveNext()
18:11:33.734035 ...\Program.cs:578      trace: [Run] fatal: HttpRequestException encountered.
   An error occurred while sending the request.

The root of the problem could be windows DNS. In my case using VPN most of the time adds IPv6 addresses for the bitbucket.org. Those addresses are unreachable and when GCM tries to connect to bitbucket it just times out. Then GCM incorrectly assumes that timeout was actually login failure and asks for password again.

Hi
Thanks for the information @PaulDotNet I'm not experiencing this at the moment, but I will try and investigate further.

I switched to using the ssh agent that comes with PuTTY. No problems since.

On Sep 28, 2018, 3:23 AM, at 3:23 AM, Oliver Janik notifications@github.com wrote:

Any news? Utterly broken for me.

--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
https://github.com/Microsoft/Git-Credential-Manager-for-Windows/issues/751#issuecomment-425346374

Solved by installing Git 2.19 & Git Credentials Manager 1.17.1

Ssh may solve the problem. Fixes by GCM upgrades most of the time are just random coincidences.

I'm a little lost. Will there be an update that fixes this?

Apparently not because technically it is not a GCM problem. I just use my own fork of GCM right now :)

You forked GCM and presumably fixed it in the fork, right? Can you contribute back?

Otherwise what is the workaround?

My pull request #771 was rejected. Explanations in comments of the pull request.

Rejected on technicality but I still have not seen a fix for the underlying issue from the maintainers.

@oliverjanik Bitbucket wrote a blog about their IPv6 changes here: https://confluence.atlassian.com/bbkb/recent-ipv6-changes-840796883.html

At the bottom of the page they offer a solution for your PC by updating the hosts file. This redirects your machine to IPv4 for bitbucket.org.

However, if you are experiencing connectivity issues the best person to follow-up with is your network administrator to determine why the address isn't being routed correctly.

Forcing IPv4 with the hosts file change suggested by @jeschu1 fixed it for me.

My network admin is Spectrum (Time Warner Cable) - at my office we just use a router with default settings provided by Spectrum connected directly to the net, and at home I have changed the SSID and WPA2 password, and that's it. Still seeing this. I'm not sure there's anything to change in either of these locations.

A graceful response to a timeout or an error is probably not too much to ask.

Hardcoding the IP in hosts did not work for me, but ~installing the v1.8.2 pre-release did.~ _spoke too soon_

@jeschu1 As a user I do not care the problem is outside your app. Your product seems defective and you have some decent work-arounds available, but you're choosing to take ideological stand.

In the real world you have to compromise as there are things that are out of your users' control.

IPv6 Coverage is only at 25%: https://www.google.com/intl/en/ipv6/statistics.html

Would a simple preference for IPv4 solve this?

What is your take on this, @gistofj @XhmikosR @Haacked ?

Hardcoding the IP in hosts actually broke bitbucket even in the browser. Worse than not working.

@CaptainN Did you hardcode it to the value from the sample Workaround or to something that you got from nslookup bitbucket.org? I can't reach the one from the sample at all. Picking one of the IPs I _can_ reach didn't make the problem worse, but it didn't make it any better, either.

I still do not think that the troubles I'm having are IPv6-related. I think they're some network security stuff. I sometimes fail on the first request of the day, but I always get through after that. My annoyance with GCM is the recovery from the failure, not the failure itself. I don't want to be asked to update my password when GCM can't talk to the remote in the first place.

@oliverjanik You might want to soften your tone. Nothing kills the desire to work on a project as much as flaming from its users. I agree there's a bug to fix here, but @jeschu1's objections to the mechanism in Paul's PR are valid.

@mminns can you advise how to best help the users that appear to be having trouble with ipv6/Bitbucket?

@michaelblyons can you open a separate issue and supply a GCM_TRACE log of what happens in your scenario (redacting any personal info)? The top issue here shows git trying 'get' 3 times, which calls GCM 3 times, resulting in 3 popups.

@oliverjanik you will find it quite counterproductive to pounce on the same people you are asking to do all the work. Quite counterproductive.

@oliverjanik you can build my GCM fork and see if it helps. I found it quite useless both trying to convince GCM devs to accept my solution as well as getting local IT staff look into this network problem. Not my problem (tm) at its finest.

I tried it by putting the ip address from the linked Atlassian page in my hosts file - that ip address appears to be invalid. If I ping bitbucket.org (without changes to the hosts file) I get the ip address 18.205.93.0 - if I put that into my hosts file, things seem to improve. I'll let you know if that continues to work for more than a few minutes.

@CaptainN GCM calls api.bitbucket.org which has different IP addresses. Try adding both bitbucket.org and api.bitbucket.org

8 days later - still no popup! This seems to do it.

18.205.93.0 bitbucket.org
18.205.93.7     api.bitbucket.org
Was this page helpful?
0 / 5 - 0 ratings