Manage personal and professional github accounts - ashBabu/Utilities GitHub Wiki
Generate SSH keys for each accounts here
ssh-keygen -t ed25519 -C [email protected]- Enter a file in which to save the key:
/home/YOU/.ssh/id_ed25519_haiand ENTER - Optionally give passwords twice on prompt
Adding your SSH key to the ssh-agent
eval "$(ssh-agent -s)"ssh-add ~/.ssh/id_ed25519_hai
Adding a new SSH key to your github account
cat ~/.ssh/id_ed25519_hai.pub- Copy the contents
Github --> Settings --> SSH & GPG Keys --> New SSH Key
Creating GPG Keys for verified commits
Note: Create one for personal and one for professional
gpg --full-generate-key- ENTER three times to accept the default
- Enter user credentials.
gpg --list-secret-keys --keyid-format=long
home/ash/.gnupg/pubring.kbx
----------------------------
sec ed25519/4D07CFD11ED9D 2026-10-08 [SC]
6C2C4CA9FEDE01785F63E5734D07CFD11F8FED9D
uid [ultimate] ash (headlight email for verified commits) <[email protected]>
ssb cv25519/083FB611FA0FD171 2026-10-08 [E]
gpg --armor --export 4D07CFD11ED9DGithub --> Settings --> SSH & GPG Keys --> New GPG Key
Making .gitconfigs
- Create appropriate folders. For example
mkdir -p ~/Ash/repo/personal ~/Ash/repo/headlight nano ~/.gitconfig
[user]
name = ashabu
email = [email protected]
[includeIf "gitdir:~/Ash/repo/headlight/"]
path = ~/.gitconfig-headlight
[includeIf "gitdir:~/Ash/repo/personal/"]
path = ~/.gitconfig-personal
nano ~/.gitconfig-headlight
[user]
email = [email protected]
signingkey = 4D07CFD11F8FED9D
[commit]
gpgsign = true
[tag]
gpgsign = true
[core]
sshCommand = ssh -i ~/.ssh/id_ed25519_hai -o IdentitiesOnly=yes
nano ~/.gitconfig-personal
[user]
email = [email protected]
signingkey = 5DRt07CFDFED9D
[commit]
gpgsign = true
[tag]
gpgsign = true
[core]
sshCommand = ssh -i ~/.ssh/id_ed25519_personal -o IdentitiesOnly=yes