Developer: How to check out SESAR REST API repo using git ssh - GeoSamples/sesar-rest-api GitHub Wiki

For the detail documentation, please refer to Github Document link. https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh. The following are all exercised on a MacBook Pro terminal.

The following document is generated on MacBook Pro version: macOS Big Sur, version 11.5.1

Check existing SSH keys

ls -al ~/.ssh

#It will the files in your .ssh directory if they exist. The public keys are id_rsa.pub, idecdsa.pub, id_ed25519.pub.

Generate a new SSH key

ssh-keygen -t ed25519 -C "[email protected]"
Generating public/private ed25519 key pair.
Enter file in which to save the key (/Users/song/.ssh/id_ed25519): 
Enter passphrase (empty for no passphrase): ----> at this prompt, you enter a secure code which will be used for checking out repo source code laster
Enter same passphrase again: 
Your identification has been saved in /Users/song/.ssh/id_ed25519.
Your public key has been saved in /Users/song/.ssh/id_ed25519.pub.
The key fingerprint is:
SHA256:H3rgcMuPlcM/cey9TJ7Q89XncWrWn6+jc0c26W4ZFEU [email protected]

Start the ssh-agent in the background.

$ eval "$(ssh-agent -s)"
Agent pid 4459

--- The number '4459' displayed on the screen is the process id of the process ssh-agent

Check to see if ~/.ssh/config file exists, if not create one

ls ~/.ssh/config
touch ~/.ssh/config
then add the following to the ~/.ssh/config file
Host *
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/id_ed25519

Add SSH keys to SSH agent

ssh-add -K ~/.ssh/id_ed25519

-K means to add key to Mac Keychain

Add the SSH key to your Github account.

See details Github doc link: https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account

Copy the SSH public key to your clipboard
pbcopy < ~/.ssh/id_ed25519.pub
# Copies the contents of the id_ed25519.pub file to your clipboard
Copy the key to Github account

From login head icon-->Settings-->SSH and GPG keys-->New SSH key or Add SSH key

title: enter a name for your key
Key: Paste the key from clipboard to the empty box

Test the key

ssh -T [email protected]
#Hi your_github_name! You've successfully authenticated, but GitHub does not provide shell access.
Make sure the above message contains your Github login name. Read more here. https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh/testing-your-ssh-connection

Check out sesar-rest-api repo

git clone [email protected]:earthchem/sesar-rest-api.git