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 orig
The response provided by Trevor is correct.
But here is what you can directly add in your .gitconfig
:
# Enforce SSH
[url "ssh://git@github.com/"]
insteadOf = https://github.com/
[url "ssh://git@gitlab.com/"]
insteadOf = https://gitlab.com/
[url "ssh://git@bitbucket.org/"]
insteadOf = https://bitbucket.org/