Git-Credential-Manager-for-Windows icon indicating copy to clipboard operation
Git-Credential-Manager-for-Windows copied to clipboard

Repeatedly asks for Bitbucket password

Open vicpon opened this issue 7 years ago • 40 comments
trafficstars

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

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 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

vicpon avatar Sep 13 '18 15:09 vicpon

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

whoisj avatar Sep 13 '18 17:09 whoisj

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

dr-ahmed-said avatar Sep 16 '18 11:09 dr-ahmed-said

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

vicpon avatar Sep 16 '18 15:09 vicpon

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

dr-ahmed-said avatar Sep 17 '18 00:09 dr-ahmed-said

It still doesn't work though

On Sep 16, 2018, 8:17 PM, at 8:17 PM, Ahmed Said [email protected] 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

vicpon avatar Sep 17 '18 02:09 vicpon

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.

PaulDotNet avatar Sep 18 '18 21:09 PaulDotNet

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...)?

CaptainN avatar Sep 20 '18 20:09 CaptainN

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.

PaulDotNet avatar Sep 20 '18 23:09 PaulDotNet

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.

CaptainN avatar Sep 21 '18 03:09 CaptainN

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.

PaulDotNet avatar Sep 21 '18 04:09 PaulDotNet

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!

PaulDotNet avatar Sep 21 '18 19:09 PaulDotNet

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.

michaelblyons avatar Sep 21 '18 19:09 michaelblyons

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.

PaulDotNet avatar Sep 21 '18 19:09 PaulDotNet

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).

CaptainN avatar Sep 24 '18 18:09 CaptainN

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.

PaulDotNet avatar Sep 25 '18 17:09 PaulDotNet

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.

whoisj avatar Sep 25 '18 18:09 whoisj

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.

oliverjanik avatar Sep 28 '18 07:09 oliverjanik

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.

PaulDotNet avatar Sep 28 '18 15:09 PaulDotNet

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

mminns avatar Sep 28 '18 20:09 mminns

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 [email protected] 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

vicpon avatar Sep 28 '18 21:09 vicpon

Solved by installing Git 2.19 & Git Credentials Manager 1.17.1

dr-ahmed-said avatar Sep 28 '18 23:09 dr-ahmed-said

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

PaulDotNet avatar Sep 29 '18 01:09 PaulDotNet

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

oliverjanik avatar Oct 08 '18 06:10 oliverjanik

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

PaulDotNet avatar Oct 08 '18 15:10 PaulDotNet

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

Otherwise what is the workaround?

oliverjanik avatar Oct 10 '18 06:10 oliverjanik

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

PaulDotNet avatar Oct 10 '18 15:10 PaulDotNet

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

oliverjanik avatar Oct 11 '18 06:10 oliverjanik

@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.

jeschu1 avatar Oct 11 '18 13:10 jeschu1

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

lukemwillis avatar Oct 16 '18 17:10 lukemwillis

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.

CaptainN avatar Oct 16 '18 17:10 CaptainN