Manjaro
- System setting
sudo nano /etc/pacman.conf
enable this line ParallelDownloads = 10
Extensions
-
Tray Icons: Reloaded by MartinPL
-
Pano - Clipboard Manager by alperenelhan
How To Work With Multiple Github Accounts on a single Machine
1. Create SSH keys for all accounts
2. Add SSH keys to SSH Agent
3. Add SSH public key to the Github
For personal
-
ssh-keygen -t ed25519 -C "nmhungify@gmail.com" -f ~/.ssh/personal
-
eval $(ssh-agent -c) && ssh-add ~/.ssh/personal
-
cat ~/.ssh/personal
-
Paste content below
vi ~/.gitconfig-personal
[core]
sshCommand = "ssh -i ~/.ssh/personal"
[user]
email = nmhungify@gmail.com
name = Hung Nguyen
signingkey = 42025A72BCA38343
[github]
user = hungify
[commit]
gpgsign = true
For work
- ssh-keygen -t ed25519 -C "work@work.com" -f ~/.ssh/work
- eval $(ssh-agent -c) && ssh-add ~/.ssh/work
- cat ~/.ssh/work
- Paste content below
mkdir ~/work && vi .gitconfig-work
[user]
email = example@work.com
name = Hung Nguyen
[github]
user = hungify2022
[core]
sshCommand = "ssh -i ~/.ssh/work"
Create a Config File and Make Host Entries
~/.ssh/config
# For personal
Host personal
HostName github.com
User git
IdentitiesOnly yes
PreferredAuthentications publickey
IdentityFile ~/.ssh/personal
# For work
Host work
HostName github.com
User git
IdentitiesOnly yes
PreferredAuthentications publickey
IdentityFile ~/.ssh/work
.gitconfig
[includeIf "gitdir:~/"]
path = ~/.gitconfig-personal
exclude = ~/work/*
[includeIf "gitdir:~/work/*"]
path = ~/work/.gitconfig-work
[push]
autoSetupRemote = true
Finally
Note
From now on, to ensure that our commits and pushes from each repository on the system uses the correct GitHub user — we will have to configure user.email and user.name in every repository freshly cloned or existing before.
Testing
cd ~/work && ssh -T git@work
or git clone git@work:hungify/xxx.git
cd ~/personal && ssh -T git@personal
or git clone git@personal:hungifyXX/xxx.git
Commit Signature Verification
1. Generate GPG key
gpg --full-generate-key
gpg --list-secret-keys --keyid-format=long
2. Get the key ID
gpg --armor --export