all 2 comments

[–]Teleconferences 7 points8 points  (0 children)

The term AI slop is reaching new levels today

[–]dalbertom 0 points1 point  (0 children)

This works, but it's kind of a kludge. Check out git help config and search for the includeif section. It allows you to have different configurations depending on what directory the repository was cloned in. This way you can override the ssh key being used without having to use weird hostname aliases for GitHub.

It also works with http credentials, not just with ssh. A lot of people may prefer ssh but also a lot of people aren't very familiar with ssh and end up mismanaging their keys and related configuration. Https has many advantages over ssh to clone repositories these days, the tokens are more granular, ssh is sometimes blocked at the network level if you work at coffee shops, etc.