Git - Setting up GitHub Keys¶
Source: dev-notes/git-setting-up-github-keys.md at main · brotherkaif/dev-notes
Resources¶
Setup¶
Open a terminal and type this, replacing the email with yours (the same one you used to create your GitHub account). It will prompt for information. Just press enter until it asks for a passphrase:
mkdir -p ~/.ssh && ssh-keygen -t ed25519 -o -a 100 -f ~/.ssh/id_ed25519 -C "TYPE_YOUR_EMAIL@HERE.com"
NB: when asked for a passphrase, put something you want (and that you’ll remember), it’s a password to protect your private key stored on your hard drive. You’ll type, nothing will show up on the screen, that’s normal. Just type the passphrase, and when you’re done, press Enter
.
Then you need to give your public key to GitHub. Run:
cat ~/.ssh/id_ed25519.pub
It will prompt on the screen the content of the id_ed25519.pub
file. Copy that text, then go to github.com/settings/ssh.
Click on Add SSH key, fill in the Title with your computer name, and paste the Key.
Finish by clicking on the Add key green button.
To check that this step is completed, in the terminal run this. You will be prompted a warning, type yes
then Enter
.
ssh -T git@github.com
If you see something like this, you’re done!
# Hi --------! You've successfully authenticated, but GitHub does not provide shell access
If it does not work, try running this before trying again the ssh -T
command:
ssh-add ~/.ssh/id_ed25519
Appendix: Links and References¶
Backlinks:
list from [[Git - Setting up GitHub Keys]] AND -"Changelog"
Jimmy Briggs jimmy.briggs@jimbrig.com | 2022