- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgithub_sshkey_setup
More file actions
Latest commit
35 lines (20 loc) · 720 Bytes
/
Copy pathgithub_sshkey_setup
File metadata and controls
35 lines (20 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# // install SSH key for github
ssh-keygen -t ed25519 -C yourname@email.com
# start the ssh Agent
eval "$(ssh-agent -s)"
# edit ssh_config and add the 2 lines underneath:
vim ~/.ssh/config
AddKeysToAgent yes
IdentityFile ~/.ssh/id_ed25519
# on github, go to settings/SSH and GPG keys
add SSH key and give a Title (name for the key)
use the public key!! .pub
cat ~/.ssh/id_ed25519.pub
copy and paste the content in github. done
# >>> only newly cloned repos will work with this new key <<<
# then set username and email
git config --global user.name "Your name here"
git config --global user.email "your_email@example.com"
# to check existing username and email:
git config user.name
git config user.email