SSH or HTTPS remote

Two ways to connect to GitHub: SSH uses a key file, HTTPS uses a token.

Also called: git@github.com, personal access token, PAT

Type
Term
Source
General
Language
Bash

In plain English

SSH URLs look like git@github.com:user/repo.git, HTTPS like https://github.com/user/repo.git. When SSH keys give trouble, switching the remote to HTTPS with a token (or gh auth login) is a quick fix.

Example

SSH kept failing on the Mac, so I switched the remote to HTTPS.

In code

ssh -T git@github.com            # test SSH access
gh auth login                    # sets up HTTPS credentials

Related terms

Added 2026-11-30 · Last reviewed 2026-11-30