I used to use SSH to clone/push/pull my projects, but I heard nowadays I can use Git Credential Manager instead of SSH.
On a new computer, without configuring SSH, I installed Git Credential Manager. When I try to push/pull from my old repo, or clone a new repo, I expect an auth window to popup. However, I simply get "Permission denied (publickey)".
How do I configure Git Credential Manager on a new computer and use it instead of SSH?
After installing Git Credential Manager,
https
url, not the git@xxx
url that you used to use with ssh.git@xxx
to the https
one.To see if your previous repo used the ssh remote:
cd my-old-project
git remote -v
To change it to https:
git remote set-url origin https://github.com/my_username/my-repo-name.git
Then you can start working on it normally, for instance git fetch
, and Git Credential Manager will handle the rest.