News for hackers. Stuff that matters.
Re:Popular Git config options by NewJazz on Friday February 16, 2024 @03:13PM (#39402360)
Another way to get that instead of behavior is with SSH configuration. I have something like this in my ssh config:

    Host github
        Hostname github.com
        User git
Then you can do a "git clone github:microsoft/windows" and you're good to go.
Re:Popular Git config options by OJFord on Friday February 16, 2024 @03:19PM (#39402419)
True. If I'm only using it for git though makes sense to keep the config there IMO. But certainly that's handy when you're sshing interactively or doing other things with that host.
Re:Popular Git config options by jerpint on Friday February 16, 2024 @04:32PM (#39403247)
Neat
Re:Popular Git config options by hinkley on Friday February 16, 2024 @05:55PM (#39404128)
This fuckin' guy.

If you've evolved an SSO solution from brownfield, or just merged with another company you can easily end up in a spot where you have 2 user names across the systems, and that's before you get into doing things like pushing bug fixes to Github straight from your work machine.

Make yourself an .ssh/config file. Set your user, and your ssh key for where it matters (I don't use the same key for ssh to servers and for talking to github or bitbucket)

Re:Popular Git config options by NewJazz on Friday February 16, 2024 @10:31PM (#39406087)
Ay usually "this fucking guy" has a pejorative tone... I think you were agreeing with me but yeah not sure everyone understood the same.
Re:Popular Git config options by hinkley on Saturday February 17, 2024 @12:51AM (#39406799)
The show where everything is made up, and the points don’t count.
Re:Popular Git config options by saghm on Friday February 16, 2024 @10:49PM (#39406189)
> Make yourself an .ssh/config file. Set your user, and your ssh key for where it matters (I don't use the same key for ssh to servers and for talking to github or bitbucket)

Another good setting for your ssh config if you use different keys for different servers is to require passing a key for all hosts rather than it trying each of your keys to see which one works:

Host * IdentitiesOnly yes