How to Connect to Github from HPC

Keren Xu


Set up keys for SSH

This post has mentioned how to create public key and private key for the discovery cluster on hpc.

[christay@discovery .ssh]$ ssh-keygen -t rsa -b 2048 -f id_rsa_git
[christay@discovery .ssh]$ ls id_rsa_git*

Add the private key in the key pair to ~/.ssh/config

[christay@discovery work]$ cat ~/.ssh/config
# Added by Warewulf 2020-01-28
Host *
  IdentityFile ~/.ssh/cluster
# Add below here -->
  IdentityFile ~/.ssh/id_rsa_git
  User <my Git username>

Add the public key in the key pair to Github

Detailed steps have been documented in jenny bryan happy git 11.5 Provide public key to GitHub

Now we are all set~
Try ssh -T to test your connect to Github.

Set up a new repo

git init
git add
git commit

Create a empty repo on Github, then

git remote add origin
git push -u origin master