git-credential-manager icon indicating copy to clipboard operation
git-credential-manager copied to clipboard

Git push fails to authenticate: Found 0 accounts in the store for service=https://github.com.

Open Jacob-Stevens-Haas opened this issue 1 year ago • 0 comments

Version

2.4.1

Operating system

Linux

OS version or distribution

Linux 4.15.0-213-generic (Ubuntu, Ubuntu 18.04.6)

Git hosting provider(s)

GitHub

Other hosting provider

No response

(Azure DevOps only) What format is your remote URL?

None

Can you access the remote repository directly in the browser?

Yes, I can access the repository

Expected behavior

git push authenticates. I tried:

pass init <gpg_id>
git-credential-manager configure
git push

Actual behavior

I get asked for a Username/password or PAT.

I have verified that ~/.password-store/.gpg-id contains my gpg id (I've done every variation of pass init short form of keyid, long form of keyid, full keyid, and key email. I have verified that the gpg id on github is correct. I verified that git-credential-manager diagnose was all good.

Ok, maybe there's something weird with this being an SSH machine. Maybe a local install will work, with dpkg -x and putting pass and git-credential-manager on my local path: I have uninstalled and reinstalled pass. I have unconfigured, uninstalled, reinstalled, and reconfigured git-credential-manager. Verified with which that I'm getting the correct executables.

same issue

I then made a personal access token on github and authenticated that way. It works, but I can see the password store at

Password Store
├── git
│   └── https
│       └── github.com
│           └── Jacob-Stevens-Haas

just has my PAT in it, beginning ghp_. On my machine where GCM works, the password store begins gho_

Logs

Setting GCM_TRACE=1:

jmsh@machine:~/git-repo $ git push
22:12:51.040509 git.c:462               trace: built-in: git push
22:12:51.041061 run-command.c:661       trace: run_command: GIT_DIR=.git git remote-https origin https://github.com/Jacob-Stevens-Haas/gen-experiments.git
22:12:51.046019 git.c:748               trace: exec: git-remote-https origin https://github.com/Jacob-Stevens-Haas/gen-experiments.git
22:12:51.046191 run-command.c:661       trace: run_command: git-remote-https origin https://github.com/Jacob-Stevens-Haas/gen-experiments.git
22:12:51.253586 run-command.c:661       trace: run_command: '/home/jmsh/.local/bin/git-credential-manager get'
22:12:51.568020 git.c:462               trace: built-in: git config --null --list
22:12:51.851793 ...e/Application.cs:106 trace: [RunInternalAsync] Version: 2.4.1.0
22:12:51.862763 ...e/Application.cs:107 trace: [RunInternalAsync] Runtime: .NET 7.0.13
22:12:51.863025 ...e/Application.cs:108 trace: [RunInternalAsync] Platform: Linux (x86-64)
22:12:51.863047 ...e/Application.cs:109 trace: [RunInternalAsync] OSVersion: Ubuntu 18.04.6 LTS
22:12:51.863149 ...e/Application.cs:110 trace: [RunInternalAsync] AppPath: /home/jmsh/.local/bin/git-credential-manager
22:12:51.863980 ...e/Application.cs:111 trace: [RunInternalAsync] InstallDir: /home/jmsh/.local/bin/
22:12:51.864258 ...e/Application.cs:112 trace: [RunInternalAsync] Arguments: get
22:12:52.013239 ...GitCommandBase.cs:32 trace: [ExecuteAsync] Start 'get' command...
22:12:52.063013 ...GitCommandBase.cs:46 trace: [ExecuteAsync] Detecting host provider for input:
22:12:52.069901 ...GitCommandBase.cs:47 trace: [ExecuteAsync] 	protocol=https
22:12:52.070383 ...GitCommandBase.cs:47 trace: [ExecuteAsync] 	host=github.com
22:12:52.070509 ...GitCommandBase.cs:47 trace: [ExecuteAsync] 	wwwauth=Basic realm="GitHub"
22:12:52.090119 ...viderRegistry.cs:149 trace: [GetProviderAsync] Performing auto-detection of host provider.
22:12:52.092200 ...viderRegistry.cs:162 trace: [GetProviderAsync] Auto-detect probe timeout is 2 ms.
22:12:52.112584 ...viderRegistry.cs:170 trace: [GetProviderAsync] Checking against 4 host providers registered with priority 'Normal'.
22:12:52.121747 ...GitCommandBase.cs:49 trace: [ExecuteAsync] Host provider 'GitHub' was selected.
22:12:52.145701 ...edentialStore.cs:359 trace: [GetGpgPath] Using PATH-located GPG (gpg2) executable: /usr/bin/gpg2
22:12:52.171437 ...bHostProvider.cs:142 trace: [GetCredentialAsync] Found 0 accounts in the store for service=https://github.com.
22:12:52.176389 ...bHostProvider.cs:218 trace: [FilterAccounts] Account filtering is enabled.
22:12:52.259113 ...bHostProvider.cs:226 trace: [FilterAccounts] Filtering based on WWW-Authenticate header information...
22:12:52.261819 ...bHostProvider.cs:229 trace: [FilterAccounts] Matched 0 accounts with public domain:
22:12:52.262132 ...bHostProvider.cs:181 trace: [GetCredentialAsync] No existing credentials found.
22:12:52.262157 ...bHostProvider.cs:184 trace: [GetCredentialAsync] Creating new credential...
22:12:52.280302 ...bHostProvider.cs:420 trace: [GetSupportedAuthenticationModesAsync] https://github.com/ is github.com - authentication schemes: 'Pat, OAuth'
Select an authentication method for 'https://github.com/':
  1. Device code (default)
  2. Personal access token

Jacob-Stevens-Haas avatar Dec 19 '23 06:12 Jacob-Stevens-Haas