Github
SSH connection 1, 2
-
Check whether the SSH keys exist:
$ cd ~/.ssh $ lsIf there is no Private or Public key, may need to create one by:
$ ssh-keygen -t rsa -C "your_email@example.com"id_rsaandid_rsa.pubwill be public and private key respectively. -
To add a public key to GitHub account
- Log in to GitHub account and click on profile picture.
- From the dropdown menu, select "Settings".
- On the settings page, click on the "SSH and GPG keys" button in the sidebar.
- Click on the "New SSH key" button.
- Enter any title for the key and copy the content of the
id_rsa.pubfile generated in the previous step and paste it into the "Key" input box. - click the "Add SSH key" button to add the public key to GitHub account.
-
Connection
ssh -T git@github.com- If shows
Hi username! You’ve successfully authenticated, but GitHub does not provide shell access, then it sucess. - For remote connection, may need to use in the format of
git@github.com:XXX/XXX.git