Skip to content

Switch Git to use SSH instead of HTTPS

When you use Git you can specify either SSH or HTTPS for the origin. This guide changes your existing Git config for the given checked out repo from using HTTPS to SSH


First browse to your repo in Terminal then check the current Origin URL

git remote -v

It will start with HTTPS.

Copy the URL and then run the following replacting HTTPS with SSH

git remote set-url origin git@github.com:<org>/<repo>.git