Skip to content

Latest commit

 

History

History
60 lines (50 loc) · 1.49 KB

Dev Git GitHub SSH keys.md

File metadata and controls

60 lines (50 loc) · 1.49 KB

GitHub SSH keys

Generate SHH at cmd

ssh-keygen -t ed25519 -C "your_email@example.com"

Run ssh-agent at Windows PowerShell

Get-Service ssh-agent | Set-Service -StartupType Automatic -PassThru | Start-Service
start-ssh-agent.cmd

Testing your SSH connection at cmd

ssh-add path_to_add_ssh/private_key
ssh-add -D path_to_remove_ssh/private_key
ssh -T git@github.com

Copy SSH file to another PC

copy path_to_remove_ssh/private_key into c:\Users\user\.ssh\
ssh-add path_to_add_ssh/private_key
ssh -T git@github.com

Git global config

git config --global --list
git config --global gpg.format ssh
git config --global --unset gpg.format
git config --global user.signingkey /PATH/TO/.SSH/KEY.PUB
git config --global commit.gpgsign true

Git local config

git config --list
git config gpg.format ssh
git config --unset gpg.format
git config user.signingkey /PATH/TO/.SSH/KEY.PUB
git config commit.gpgsign true

Adding or changing a passphrase

ssh-keygen -p -f ~/.ssh/id_ed25519

Creates a signed commit

git commit -S -m "YOUR_COMMIT_MESSAGE"