This is a quick guide for if you’ve cloned a git repo via HTTPS and you want to change it to SSH.
This assumes SSH keys are set-up.
First I’ll clone my repo using HTTPS. All remote actions will require the Git account password which is why you want to use SSH.
Then check the Git Remote URL.
git remote get-url origin
The URL begins with HTTPS so it’s clear to see what’s being used.
Navigate to the repo link and select SSH.
Now amend the Git URL and check the status with a URL check & fetch.
git remote set-url origin <ssh-url>