-
Notifications
You must be signed in to change notification settings - Fork 21
Git key setup
Christopher Strøm edited this page Sep 1, 2021
·
7 revisions
Since the fall of 2021, authenticating with GitHub through username/password in the terminal has been deprecated, and so to fully utilize our GitHub page, you will need to set up your SSH keys and PAT (Personal Access Token)
Open a terminal window
Run the following command, substituting in your GitHub email address.
ssh-keygen -t ed25519 -C "your_email@example.com"
When prompted, just press enter until you are done. You now have an ssh key on your local computer. You will now need to add this to your GitHub account:
- Run the following commands to get the key you just generated copied to your clipboard:
sudo apt update
sudo apt install xclip
xclip -selection clipboard < ~/.ssh/id_ed25519.pub
- In the upper-right corner of any page, click your profile photo, then click Settings.
- In the user settings sidebar, click SSH and GPG keys.
- Click New SSH key or Add SSH key.
- In the "Title" field, add a descriptive label for the new key.
- Paste your key into the "Key" field.
- Click Add SSH key.
A Personal Access Token is a way to authenticate yourself without the use of a username/password combination. We reccomend using libsecret to do this:
- Run the following commands to setup git with libsecret:
sudo apt-get install libsecret-1-0 libsecret-1-dev
cd /usr/share/doc/git/contrib/credential/libsecret
sudo make
git config --global credential.helper /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
- The next time you are promted to authenticate with username/password through git, you will need to paste in a PAT for both - so you will need a PAT in the first place:
- In the upper-right corner of any page, click your profile photo, then click Settings.
- In the user settings sidebar, click Developer settings, then Personal access tokens
- Click "Generate new token" to set up a new PAT
- Give your PAT a descriptive name.
- Set the expiration date to whatever you like, but note that once the key expires, you will need to go through this process again.
- Select whatever scope you wish the PAT to have -> Full access (checking every box) is fine for this purpose, but do as you please.
- Click "Generate token" and COPY the token - you will only get this one chance to see it!
- Next time you are prompted for your username and password in the git terminal, paste this token in for both your username and password
- You will now never have to worry about authentication again, until the token expires!
HOME User Manual
- Git key setup
- Software installation
- Beluga
- Manta
- Pool testing at MC-Lab
- Using services to launch packages
Development Guidelines
Documentation
Theory and Resources