Config Github
1 min read
This page includes some snippets to manage Github ssh connection settings.
Behind a proxy
Connect to Github with ssh behind a proxy. In the config file:
Host github.com
Hostname ssh.github.com
Port 443
User git
Test if success.
ssh -T -p 443 git@ssh.github.com
ssh -T git@github.com
Customizing name
By default ssh-keygen -t rsa
creates the identify file named id_rsa
. There are two options to add identify file to ssh manager.
- In the ssh config add the
IdentifyFile
entry ssh-add --apple-use-keychain /path/to/key
Multiple Github profiles
To manage multiple Github ssh keys on a single machine, add a new domain in ssh config.
Host github.com-another-account
Hostname ssh.github.com
Port 443
IdentityFile ~/.ssh/id_rsa_another_account
Test if success.
ssh -T git@github.com-another-account
Cloning repository.
git clone git@github.com-another-account:another_account_name/repo_name.git