Git SSH Cheat Sheet
Remote URL Formats
Section titled “Remote URL Formats”GitHub
Section titled “GitHub”git@github.com:{owner}/{repository}.gitAzure DevOps
Section titled “Azure DevOps”git@ssh.dev.azure.com:v3/{organization}/{project}/{repository}GitLab
Section titled “GitLab”git@gitlab.com:{owner}/{repository}.gitTest SSH authentication
Section titled “Test SSH authentication”GitHub
Section titled “GitHub”ssh -T git@github.comAzure DevOps
Section titled “Azure DevOps”ssh -T git@ssh.dev.azure.comGitLab
Section titled “GitLab”ssh -T git@gitlab.comChange an existing remote to SSH
Section titled “Change an existing remote to SSH”git remote set-url origin git@ssh.dev.azure.com:v3/{organization}/{project}/{repository}git remote set-url origin git@github.com:{owner}/{repository}.gitgit remote set-url origin git@gitlab.com:{owner}/{repository}.gitInspect Current Remotes
Section titled “Inspect Current Remotes”git remote -vIf this shows something like https://provider... then SSH is not being used.
Verify which Key is used
Section titled “Verify which Key is used”ssh -vT git@github.comssh -vT git@gitlab.comssh -vT git@ssh.dev.azure.comConfigure Credentials
Section titled “Configure Credentials”See SSH credentials