These days when I create a new repository on GitHub on the setup page I get:
git remote add origin https://github.com/nikhilbhardwaj/abc.git
git push -u origin master
And whenever I have to push a commit I need to enter my GitHub username and password.
I can manually change that to
[email protected]:nikhilbhardwaj/abc.git
in the .git/config
. I find this quite irritating - is there some way I can configure git to use SSH by default?
insteadOf
trick has been around since at least 2012. Also see How to convertgit:
urls tohttp:
urls. – Louettalough