Setup SSH in GitHub
- This works for MCC or any secure shell (SSH), such as the Gemini system
- The goal of this tutorial is to show how to use GitHub on a supercomputer and how to authenticate your GitHub account without a password
Create Personal Access Token on GitHub
A personal access token is used in lieu of a password when cloning private repositories to your local machine or a server that runs with SSH.
- On GitHub, navigate to username > Settings > Developer settings > Personal access tokens > Tokens (classic) > Generate new token
- Press New personal access token (classic)
- Edit the note to reflect a descriptive title for what this is used for. For instance “github-user-login”
- Set an expiration date. This can be set to up to a year in the future.
- Select scopes (permissions) for what you can access with the personal access token. To be conservative select repo, write:packages, delete:packages, admin:public_key, read:user, write:discussion, project, and admin:ssh_signing_key
-
+
- Press Generate Token
- Copy the token now (you will only be able to see it once) and store it in a safe location. Important: copy the personal access token now and save it in a secure location
- On the mcc, change your git config settings to match your GitHub settings. Check these changes with git config -l
git config --global user.name "your_github_username"
git config --global user.email "your_github_email"
git config -l
Create GitHub SSH Keys
- Login to mcc or other secure shell.
ssh user@mcc.uky.edu