GitGuardian GitHub Accounts Cheatsheet
GitGuardian GitHub Accounts Cheatsheet
-t is the algorithm, ED25519 is recommended for Create specifics .gitconfigs for each account/ /myhome/
ssh-keygen \
-t ed25519 \
-C "[email protected]" \
comment
|__.gitconfig.work
-f ~/.ssh/<personal_key>
-f is to define a filename, helping you remember |__personal/
0 2 add a passphrase
0 7 set up your git con f igs
Add an extra layer of security: if someone gains
access to your computer, your keys will be ssh-keygen -p -f ~/.ssh/<personal_key> Tell Git which key to use with the SSH command (-i option to specify an identity file/key).
compromised unless they are attached to a To update the passphrase for your SSH key at # ~/personal/.gitconfig.pers
# ~/work/.gitconfig.work
passphrase.
any time
[user]
[user]
email = [email protected]
email = [email protected]
[github]
[github]
user = “pro_name”
[core]
[core]
path = ~/personal/.gitconfig.pers
[includeIf “gitdir:~/work/”]
path = ~/work/.gitconfig.work
IdentityFile ~/.ssh/<created_key>
05 Copy it to your vcs You are done! You can now choose to
Copy your key to your clipboard and then
paste it in GitHub, GitLab or BitBucket
macOS tr -d '\n' < ~/.ssh/<created_key>.pub | pbcopy clone your repo git clone git@<repository.domain.com>:<username>/<repo_name>.git
Linux xclip -sel clip < ~/.ssh/<created_key>.pub add your remote git remote add origin git@<repository.domain.com>:<username>/<repo_name>.git
Windows cat ~/.ssh/<created_key>.pub | clip or change it git remote set-url origin git@<repository.domain.com>:<username>/<repo_name>.git