News for hackers. Stuff that matters.
Re:Conditional Git Configuration by gertlex on Wednesday January 10, 2024 @10:34PM (#38947204)
I tested it myself, like `ssh [email protected]` and that didn't work.

That was my interpretation of the original comment. (reading it again, it seems like it was indeed saying what I typed below)

It seems like the reply was saying instead you can do in your .ssh/config file

   Host work.github.com
   HostName github.com
   Host me.github.com
   HostName github.com
(or just leave out the .github.com in the Host part)

So `ssh [email protected]` now works...

And then key the github config off of that? But I didn't try that part. So I could be wrong there.

Re:Conditional Git Configuration by hashhar on Friday January 12, 2024 @02:04AM (#38964964)
Yes this is what they mean. I've use this setup in the past when for example I wanted to use different SSH keys for bitbucket, gitlab and github for example.

It works even for same hostname like I did here - https://github.com/hashhar/dotfiles-tmp/blob/master/ssh/.ssh...