-
Notifications
You must be signed in to change notification settings - Fork 1
Developer: How to check out SESAR REST API repo using git ssh
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
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.
ssh-keygen -t ed25519 -C "your_email@example.com"
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 your_email@example.com
$ eval "$(ssh-agent -s)"
Agent pid 4459
--- The number '4459' displayed on the screen is the process id of the process ssh-agent
ls ~/.ssh/config
touch ~/.ssh/config
then add the following to the ~/.ssh/config file
Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_ed25519
ssh-add -K ~/.ssh/id_ed25519
-K means to add key to Mac Keychain
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
pbcopy < ~/.ssh/id_ed25519.pub
# Copies the contents of the id_ed25519.pub file to your clipboard
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
ssh -T git@github.com
#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
git clone git@github.com:earthchem/sesar-rest-api.git