Last active
January 29, 2021 12:29
SSH config for public key authentication with GitHub
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# File: .ssh/config | |
# SSH config for public key authentication with GitHub (SSH or HTTPS) | |
# Alternative 1: Regular (SSH) | |
# ----------------------------------------------------- | |
# You can check if your network allows you to use port 22 | |
# by testing if you can access http://portquiz.net:22 | |
Host github.com | |
User git | |
Hostname github.com | |
PreferredAuthentications publickey | |
IdentityFile /Users/larserik/.ssh/id_rsa | |
# Alternative 2: Wrapping SSH in HTTPS | |
# ----------------------------------------------------- | |
# This option is suitable when your network has blocked | |
# network requests over port 22. | |
Host github.com | |
User git | |
Hostname ssh.github.com | |
Port 443 | |
PreferredAuthentications publickey | |
IdentityFile /Users/larserik/.ssh/id_rsa |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment