private-schrijfsels-en-noti.../2024/Github multiple users and k...

606 B

For pyrotechny.eu a different user account and SSH key is used. When using git ssh config can override the domain name and use it with different settings. See below:

.ssh/config:

Host gh_pyrotechny
	Hostname github.com
	User git
	IdentityFile ~/.ssh/id_ecda_pyrotechny_eu

.git/config:

jerry@Jerrys-iMac pyrotechny.eu % git remote -v
local	/Users/jerry/src/github.com/xor-gate/pyrotechny.eu (fetch)
local	/Users/jerry/src/github.com/xor-gate/pyrotechny.eu (push)
origin	gh_pyrotechny:pyrotechny-eu/pyrotechny.eu.git (fetch)
origin	gh_pyrotechny:pyrotechny-eu/pyrotechny.eu.git (push)