Setup your Git access - CustodesTechnologia/System GitHub Wiki
Using the repo
You'll need your account on Github to be aware of your public key.
Make the Keys
On your local system (PC, etc.) go to your home directory
On Windows this will look like C:\Users\Joe
On Unix-like (Linux, Cygwin, git-for-windows) this will look like ~joe
(cd ~joe
)
Then, unless you already have made SSH keys:
ssh-keygen
This generates a public/private keypair:
JoeUser@machine MINGW64 ~
$ cd
JoeUser@machine MINGW64 ~
$ cd .ssh
JoeUser@machine MINGW64 ~/.ssh
$ ls -la
total 53
drwxr-xr-x 1 JoeUser 197121 0 Feb 19 11:12 ./
drwxr-xr-x 1 JoeUser 197121 0 Mar 20 12:19 ../
-rw------- 1 JoeUser 197121 0 Aug 11 2021 config
-rw------- 1 JoeUser 197121 1675 May 22 2020 id_rsa
-rw------- 1 JoeUser 197121 399 May 22 2020 id_rsa.pub
-rw-r--r-- 1 JoeUser 197121 2681 Feb 28 20:04 known_hosts
The file you need is id_rsa.pub
That is the public key.
The other key file id_rsa
is the private key.
Share the private key with no one.
The only key you share is the public key id_rsa.pub
Back to Github
Upper right corner, select your avatar, dropdown select "Settings"
Along left panel, select section "SSH and GPG keys"
Upper right corner, green button "New SSH Key"
Paste the contents of id_rsa.pub
from your LOCAL sytem into the text field.
Save
Now test it:
From the LOCAL git
shell:
ssh -T [email protected]
The results should succeed with a message like this:
ssh -T [email protected]
Hi sibomots! You've successfully authenticated, but GitHub does not provide shell access.
If not, review this page:
https://docs.github.com/en/authentication/connecting-to-github-with-ssh/testing-your-ssh-connection