Saturday
Apr232022
Git Push asks for Password instead of using SSH Key
Sat 2022-04-23
One recurring minor annoyance with git is that if you create a new local respository using git clone then it defaults to always asking for a password when you do git push instead of using a pre-existing SSH key. If you are pushing to Github then the push will fail because Github recently started blocking password-based access on security grounds.
To get it to use the SSH key you need to open .git/config in an editor and change the [remote "origin"] url so it starts ssh:// instead of https;//.
Reader Comments