Using git credentialmanager with github tokens for gists

  access-token, git, gitlab, windows

I’m trying to push my gist to github and trying to do it the right way by using the credential manager as per this answer

I assumed following simple workflow would suffice

  • clone a gist
  • pushing would ask credentials (username/token)

Unfortunately, it’s either not that simple or I messed up somewhere else. All I get is a remote: Repository not found.

Cloning my gist

C:UserslieveAppDataLocalTemp>git clone
Cloning into '4884d047b3b90ccd697a4d7ec21be49d'...
remote: Enumerating objects: 9, done.
remote: Total 9 (delta 0), reused 0 (delta 0), pack-reused 9
Receiving objects: 100% (9/9), done.
Resolving deltas: 100% (2/2), done.

Show remotes

C:UserslieveAppDataLocalTemp>cd 4884d047b3b90ccd697a4d7ec21be49d
C:UserslieveAppDataLocalTemp84d047b3b90ccd697a4d7ec21be49d>git remote -v
origin (fetch)
origin (push)

Try to push fails and doesn’t ask any credential

C:UserslieveAppDataLocalTemp84d047b3b90ccd697a4d7ec21be49d>git push
remote: Repository not found.
fatal: repository '' not found

Credential manager diagnosis
C:UserslieveAppDataLocalTemp84d047b3b90ccd697a4d7ec21be49d>git credential-manager-core diagnose
Running diagnostics…

 [ OK ] Environment
 [ OK ] File system
 [ OK ] Networking
 [ OK ] Git
 [ OK ] Credential storage
 [ OK ] Microsoft authentication (AAD/MSA)
 [ OK ] GitHub API

Diagnostic summary: 7 passed, 0 skipped, 0 failed.

I can get push to work by changing the remote to https://<token> but that’s exactly what the credential manager should take care of?

Source: Windows Questions