Connecting to GitHub Enterprise (command-line)Connecting to GitHub Enterprise (command-line)
Connecting to GitHub Enterprise at Georgia Tech, unlike Github.com, requires a few additional steps because GitHub Enterprise is not publicly accessible.
Please note that it is much easier to connect to GitHub Enterprise via GitHub Desktop, which natively supports enterprise installs like GitHub Enterprise at Georgia Tech.
To facilitate access to a repository in GitHub Enterprise at Georgia Tech, follow the directions below.
Derived from metroplus documentation.
- Generate a SSH key:
ssh-keygen -f ~/.ssh/filename-goes-here -b 4096
- Copy SSH key files onto your server of choice into ~/.ssh/, making sure that your private key is chmod to 0400.
- Add the SSH key to your GitHub Enterprise at Georgia Tech account.
- Establish SSH fingerprint for GitHub Enterprise at Georgia Tech:
ssh-keyscan github.gatech.edu >> ~/.ssh/known_hosts
- Edit (or create) file config in ~/.ssh/. This file is responsible for routing the generic firstname.lastname@example.org account to the defined SSH key on the server and on Github. See below for an example config file.
Sample config file
The above configuration routes git repository URLs for Host (github.gatech.edu) to check for the SSH key file under IdentityFile with the git account (User).