[Solved] How to set git-config(1) depending on which ssh-key is used?

Latest response

Hello everyone,

While everybody is exited about RHEL 8 these days, I have a rather basic question about using and configuring git.

On some of our server my colleagues and me have to share a role account, lets call it 'lordofdoom' in this example. While sharing an account with other people is not the best way to operate a server in some cases we have to live with it.

Anyway, we are using git to keep track of our work but are not able at the moment to determine which colleague commited a change when they forgot to change git-config(1) accordingly every time they log in. Is there a way to set git-config(1) automatically when logging in via ssh?

Best regards,


Well, just found Carrying your Git settings around. I'll let you know if that works after I tried it out.

Update 2019-05-22: It worked as expected. Case solved.