News for hackers. Stuff that matters.
Re:Organizing Multiple Git Identities by hk1337 on Monday October 16, 2023 @02:27PM (#37904014)
Curious, why would you need separate ssh keys for the same site? In the above example, you're authenticating the GitHub, not really to client1 or client2.

The only thing that would need to change, AFAIK, is the name and email you use for commits, not necessarily our ssh key.

I do use this:

    [includeIf "gitdir:~/Projects/Client1/"]
       path = ~/Projects/Client1/.gitconfig

    [includeIf "gitdir:~/Projects/Client2/"]
       path = ~/Projects/Client2/.gitconfig
to define the user.name and user.email for different projects
Re:Organizing Multiple Git Identities by king_geedorah on Monday October 16, 2023 @02:30PM (#37904059)
Last I checked, one can't use the same SSH key for multiple github accounts, so if that is part of your workflow then you have to have different keys configured.
Re:Organizing Multiple Git Identities by hk1337 on Monday October 16, 2023 @02:33PM (#37904097)
True, but I guess I am still wondering why would you need multiple GitHub accounts. I could see 1 for personal and 1 for work but still kind of wonder why. Even in that scenario, you would only need to account for 2 different ssh keys.

Typically, for Client1 and Client2, both clients could invite the same account to the organization.

Re:Organizing Multiple Git Identities by l72 on Monday October 16, 2023 @02:47PM (#37904294)
It depends on the client but several of mine have wanted me to use a separate account with an email for their domain. I suppose this is so they can take over the account rather than just removing my main account.