Skip to content

Instantly share code, notes, and snippets.

View lopugit's full-sized avatar

Nikolaj lopugit

View GitHub Profile
@lopugit
lopugit / gist:9e00dfee651269c20610d125fe51c0db
Created February 21, 2024 00:55
Multi SSH KEY config for same hosts based on directory
Finally, multi ssh key config for same host git repo's :exploding_head:
https://superuser.com/questions/366649/ssh-config-same-host-but-different-keys-and-usernames
Alternative Git configuration to automatically switch accounts depending on repo path:
Create a file ~/.config/git/config.user1 containing:
[url "github_username1:"]
insteadOf = git@github.com:
Create a config.user2 file that's the same except with "github_username2".