to test stuff
ssh-keygen -t ed25519 -C "[email protected]"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
nano ~/.ssh/config
Host github-personal
HostName github.com
User git
IdentityFile ~/.ssh/id_ed25519
Host github-work
HostName github.com
User git
IdentityFile ~/.ssh/other_id_ed25519
After editing the configuration file, save the changes and exit the text editor. In nano, you can do this by pressing Ctrl + O to write out the file and Ctrl + X to exit.
gpg --full-generate-key
gpg --list-secret-keys --keyid-format=long
# From the list of GPG keys, copy the long form of the GPG key ID you'd like to use. In this example, the GPG key ID is 3AA5C34371567BD2::
------------------------------------
sec 4096R/3AA5C34371567BD2 2016-03-10 [expires: 2017-03-10]
uid Hubot <[email protected]>
ssb 4096R/4BB6D45482678BE3 2016-03-10
gpg --armor --export 3AA5C34371567BD2
# Prints the GPG key ID, in ASCII armor format
git config --global user.name "Juan Dela Cruz"
git config --global user.email [email protected]
git config --global user.signingkey 3AA5C34371567BD2
git commit with sign test april 04 2024 git commit with sign test may 05 2024 git commit with sign test june 31, 2024 git commit with sign test in wsl2 sept 10, 2024 git commit with sign test in win11 wsl2 jan 17, 2025 git commit with sign test in win11 feb 25, 2025 (2)