Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Credential manager shows up but dissapears when trying to auth #412

Closed
4 of 16 tasks
siggemannen opened this issue Aug 15, 2021 · 5 comments · Fixed by #547
Closed
4 of 16 tasks

Credential manager shows up but dissapears when trying to auth #412

siggemannen opened this issue Aug 15, 2021 · 5 comments · Fixed by #547
Assignees
Labels
auth-issue An issue authenticating to a host network Related to networking (VPN, TCP/IP, etc) platform:windows Specific to the Windows platform

Comments

@siggemannen
Copy link

Which version of GCM Core are you using?

2.0.475+27fbadca1d

Which Git host provider are you trying to connect to?

  • Azure DevOps
  • Azure DevOps Server (TFS/on-prem)
  • GitHub
  • GitHub Enterprise
  • Bitbucket
  • Other - please describe

Can you access the remote repository directly in the browser using the remote URL?

  • Yes
  • No, I get a permission error
  • No, for a different reason - please describe

[Azure DevOps only] What format is your remote URL?

[Azure DevOps only] If the account picker shows more than one identity as you authenticate, check that you selected the same one that has access on the web.

  • Not applicable
  • I only see one identity
  • I checked each identity and none worked

Expected behavior

being able to push to github

Actual behavior

Hi. I'm using win 7 and repo url i'm trying to work with has the following format: https://github.com/siggemannen/[repo name].git
I use Git Bash but same issue is in Git GUI.
When i issue command git push origin master, it displays a dialog from the new credential manager core with the options of "sign in with browser" or enter a github token. If i click on sign in with browser, it opens a browser window saying Authentication Succeeded.
BUT, the the git window displays:
"fatal: An error occurred while sending the request.
fatal: The request was aborted: Could not create SSL/TLS secure channel."
and then continues to display the old password / username dialog from OpenSSH. Unfortunately, github disallowed password logins recently, so one cannot run any commands at all.

Same thing happens when i enter the github token. I suspect GCM core crashes, most likely due to windows 7 or wrong .NET version or something like that

Logs

12:49:28.856716 run-command.c:667       trace: run_command: 'git credential-manager-core get'
12:49:28.903516 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
12:49:28.903516 git.c:744               trace: exec: git-credential-manager-core get
12:49:28.903516 run-command.c:667       trace: run_command: git-credential-manager-core get
12:49:28.965916 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
12:49:28.965916 git.c:455               trace: built-in: git config --null credential.namespace
12:49:29.012716 ...\Application.cs:80   trace: [RunInternalAsync] Version: 2.0.475.64295
12:49:29.028316 ...\Application.cs:81   trace: [RunInternalAsync] Runtime: .NET Framework 4.0.30319.42000
12:49:29.028316 ...\Application.cs:82   trace: [RunInternalAsync] Platform: Windows (x86-64)
12:49:29.028316 ...\Application.cs:83   trace: [RunInternalAsync] AppPath: C:\Program Files\Git\mingw64\libexec\git-core\git-credential-manager-core.exe
12:49:29.028316 ...\Application.cs:84   trace: [RunInternalAsync] Arguments: get
12:49:29.106316 ...GitCommandBase.cs:35 trace: [ExecuteAsync] Start 'get' command...
12:49:29.106316 ...GitCommandBase.cs:49 trace: [ExecuteAsync] Detecting host provider for input:
12:49:29.106316 ...GitCommandBase.cs:50 trace: [ExecuteAsync] 	protocol=https
12:49:29.106316 ...GitCommandBase.cs:50 trace: [ExecuteAsync] 	host=github.com
12:49:29.153116 ...viderRegistry.cs:100 trace: [GetProviderAsync] Host provider override was set id='github'
12:49:29.153116 ...GitCommandBase.cs:52 trace: [ExecuteAsync] Host provider 'GitHub' was selected.
12:49:29.153116 ...\HostProvider.cs:128 trace: [GetCredentialAsync] Looking for existing credential in store with service=https://github.com account=...
12:49:29.168716 ...\HostProvider.cs:133 trace: [GetCredentialAsync] No existing credentials found.
12:49:29.168716 ...\HostProvider.cs:136 trace: [GetCredentialAsync] Creating new credential...
12:49:29.199916 ...bHostProvider.cs:250 trace: [GetSupportedAuthenticationModesAsync] https://github.com/ is github.com - authentication schemes: 'OAuth, Pat'
12:49:33.226723 ...pClientFactory.cs:54 trace: [CreateClient] Creating new HTTP client instance...
ecutable dir: C:/Program Files/Git/mingw64/libexec/git-core
12:49:29.199916 git.c:455               trace: built-in: git config --null credential.gitHubAuthModes
12:49:29.231116 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
12:49:29.231116 git.c:455               trace: built-in: git config --null --list
12:49:29.246716 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
12:49:29.246716 git.c:455               trace: built-in: git config --null credential.interactive
12:49:29.262316 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
12:49:29.262316 git.c:455               trace: built-in: git config --null --list
12:49:29.277916 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
12:49:29.277916 git.c:455               trace: built-in: git config --null credential.gitHubHelper
12:49:33.211123 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
12:49:33.211123 git.c:455               trace: built-in: git config --null --list
12:49:33.226723 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
12:49:33.226723 git.c:455               trace: built-in: git config --null credential.interactive
12:49:33.242324 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
12:49:33.242324 git.c:455               trace: built-in: git config --null --list
12:49:33.257924 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
12:49:33.257924 git.c:455               trace: built-in: git config --null credential.httpsProxy
12:49:33.273524 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
12:49:33.273524 git.c:455               trace: built-in: git config --null --list
12:49:33.289124 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
12:49:33.289124 git.c:455               trace: built-in: git config --null credential.httpProxy
12:49:33.304724 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
12:49:33.304724 git.c:455               trace: built-in: git config --null --list
12:49:33.320324 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
12:49:33.335924 git.c:455               trace: built-in: git config --null http.proxy
12:49:33.367124 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
12:49:33.367124 git.c:455               trace: built-in: git config --null --list
12:49:33.398324 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
12:49:33.398324 git.c:455               trace: built-in: git config --null http.sslVerify
12:49:33.413924 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
12:49:33.413924 git.c:455               trace: built-in: git config --null --list
12:49:33.429524 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
12:49:33.429524 git.c:455               trace: built-in: git config --null credential.gitHubDevClientId
12:49:33.445124 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
12:49:33.445124 git.c:455               trace: built-in: git config --null --list
12:49:33.460724 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
12:49:33.460724 git.c:455               trace: built-in: git config --null credential.gitHubDevRedirectUri
12:49:33.476324 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
12:49:33.476324 git.c:455               trace: built-in: git config --null --list
12:49:33.491924 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
12:49:33.491924 git.c:455               trace: built-in: git config --null credential.gitHubDevClientSecret
12:49:34.098549 run-command.c:667       trace: run_command: 'git credential-store get'
12:49:34.146552 exec-cmd.c:237          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
12:49:34.146552 git.c:455               trace: built-in: git credential-store get
12:49:34.151552 run-command.c:667       trace: run_command: 'C:/Program Files/Git/mingw64/libexec/git-core/git-gui--askpass' 'Username for '\''https://github.com'\'': '
@siggemannen siggemannen added the auth-issue An issue authenticating to a host label Aug 15, 2021
@mjcheetham mjcheetham added platform:windows Specific to the Windows platform network Related to networking (VPN, TCP/IP, etc) labels Aug 25, 2021
@mjcheetham
Copy link
Collaborator

Hi @siggemannen, thanks for reporting this and including trace logs!

Could you please answer a couple of questions:

  • Are you behind a VPN or some sort of Internet proxy?
  • What specific version of Windows 7 do you have installed? Any service packs?
  • It looks like you have .NET Framework 4.6 installed (4.0.30319.42000). Are you able to upgrade to at least .NET Framework 4.7?
  • Can you check the following registry key value? Does it exist, and if it does, what value does it have?
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client
    DisabledByDefault (DWORD)
    

@siggemannen
Copy link
Author

Hi, and thanks for looking into this.

  • I'm not using any VPN or anything like that.
  • Version is Win 7 ultimate, SP1, build 7601
  • I was able to install .NET 4.8 when i upgraded git tools, and have the following version string of 528049 of .net framework.
  • I don't have the folder "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2" in the registry. Only SSL2.0 (which is disabled)
    Should i add that entry?

@mjcheetham
Copy link
Collaborator

mjcheetham commented Sep 3, 2021

Hello!

  • I don't have the folder "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2" in the registry. Only SSL2.0 (which is disabled)
    Should i add that entry?

Yes. Please follow the Microsoft instructions on enabling TLS 1.1 & TLS 1.2 for Windows 7 here:
https://support.microsoft.com/en-us/topic/update-to-enable-tls-1-1-and-tls-1-2-as-default-secure-protocols-in-winhttp-in-windows-c4bd73d2-31d7-761e-0178-11268bb10392

Follow the SChannel instructions.

Specifically, you'll need to ensure that you're on Windows 7 SP1 (which you are) and create the TLS 1.2 key with DisabledByDefault set to 0.

You can also read more here: https://docs.microsoft.com/en-gb/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/dn786418(v=ws.11)#tls-12

@siggemannen
Copy link
Author

Hi again. I have tested setting registry values and enabling TLS1.1 and 1.2 as described in your reply and it works now! Thanks a bunch for help! Might be worth to document this somewhere though

@vtbassmatt
Copy link
Contributor

@vtbassmatt to doc

@vtbassmatt vtbassmatt self-assigned this Sep 28, 2021
vtbassmatt added a commit that referenced this issue Nov 19, 2021
ldennington pushed a commit to ldennington/git-credential-manager that referenced this issue Mar 1, 2022
ldennington pushed a commit to ldennington/git-credential-manager that referenced this issue Mar 8, 2022
ldennington pushed a commit to ldennington/git-credential-manager that referenced this issue Jun 15, 2022
imgbot bot pushed a commit to Jeverett3000/Git-Credential-Manager-Core that referenced this issue Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth-issue An issue authenticating to a host network Related to networking (VPN, TCP/IP, etc) platform:windows Specific to the Windows platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants