Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 4 Current »

Overview

How to setup SSH authentication from your Agave login to GitHub.

From Github About SSH

Using the SSH protocol, you can connect and authenticate to remote servers and services. With SSH keys, you can connect to GitHub without supplying your username and personal access token at each visit. You can also use an SSH key to sign commits.

The example below will use Sol as the supercomputer to connect to.

Create new SSH Key

Step 1: Connect to Super Computer

Log on to Sol

ssh asurite@sol.asu.edu 

Step 2: Create new SSH Key

cd ~/.ssh
ssh-keygen -t ed25519 -f ~/.ssh/github_ed25519 -C $USER@asu.edu -N ''

This generates a public and private cryptographic key. A public cryptographic key is analogous to an ideal physical lock and a private cryptographic key is analogous to a physical key: it is safe to distribute as many copies of the public key as you want so long as you are the only one with access to the private key. You’ll need to provide github with a copy of your public key, but first you’ll need to configure SSH on Sol to know about your private key when connecting to GitHub

Step 3: Modify SSH Configuration

CAREFULLY, modify your SSH configuration by running the following command (note line 5’s IdentityFile value must match the name of the file created in the last step, i.e. ~/.ssh/github_ed25519):

cat >> ~/.ssh/config << EOF
Host github.com
  User         git
  Hostname     github.com
  IdentityFile ~/.ssh/github_ed25519
EOF

Add Key to GitHub

Step 1: Copy the SSH Public key to your clipboard

If your SSH public key file has a different name than the example code, modify the filename to match your current setup. When copying your key, don't add any newlines or whitespace.

cat ~/.ssh/github_ed25519.pub
# Then select and copy the printed contents to your clipboard

e.g. we would only copy line 2 in the following output, starting with ssh-ed25519 up to .edu:

[rcsparky@agave1:~/.ssh]$ cat ~/.ssh/github_ed25519.pub
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ+UnR+3dxsCWFy3IJaU+aktlDtGEwDuRvkoisksBrc/ rcsparky@asu.edu

Step 2: GitHub steps

On your computer log onto Github.com, in the upper right corner click your profile photo, then click Settings

In the user Settings sidebar, click SSH and GPG keys

Click New SSH Key

In the “Title” field, add a description label for the new key. For example, you might call this key “ASURITE on Sol”

Paste your key into the “Key” field, then click Add SSH key.

If prompted, confirm your GitHub password

After making this change you will need to use the SSH option when you clone a repository. If you have existing repositories were setup with HTTPS follow these instructions to Switch Remote URLS from HTTPS to SSH

Additional Help

If you require further assistance on this topic, please don't hesitate to contact the Research Computing Team. To create a support ticket, kindly send an email to rtshelp@asu.edu. For quick inquiries, you're welcome to reach out via our #rc-support Slack Channel or attend our office hours for live assistance

  • No labels