Live data from Hacker News

How I configure my Git identities

benji.dog

1–10 of 113 posts

Re: How I configure my Git identities

#2
you don't have to mess with ~/.ssh/config

Just put this in your ~/.gitconfig (or ~/.config/git/personal as in the article)

  [core]
      sshCommand = /usr/bin/ssh -o IdentitiesOnly=yes -i ~/.ssh/IdentityFile2 -a

This makes submodules easy without the `insteadOf`

Re: How I configure my Git identities

#4
post #2

you don't have to mess with ~/.ssh/config Just put this in your ~/.gitconfig (or ~/.config/git/personal as in the article) [core] sshCommand = /usr/bin/ssh -o IdentitiesOnly=yes -i ~/.ssh/IdentityFile2 -a This makes submodules easy without the `insteadOf`

[dead]

Re: How I configure my Git identities

#5
The includeIf stuff is pretty neat. I currently keep the SSH complexity in ~/.ssh, where I have several includes, one for each customer|project|identity. Things without unique hostnames, like github, get an alias assigned:

    Host customer-github
     Hostname github.com
     IdentityFile ~/.ssh/customer_rsa
     User git
All I have to do is use the alias in any git clone command and I'm done.

Re: How I configure my Git identities

#6
post #2

you don't have to mess with ~/.ssh/config Just put this in your ~/.gitconfig (or ~/.config/git/personal as in the article) [core] sshCommand = /usr/bin/ssh -o IdentitiesOnly=yes -i ~/.ssh/IdentityFile2 -a This makes submodules easy without the `insteadOf`

And if you have more than one SSH identity?

Re: How I configure my Git identities

#10
post #6
post #2

you don't have to mess with ~/.ssh/config Just put this in your ~/.gitconfig (or ~/.config/git/personal as in the article) [core] sshCommand = /usr/bin/ssh -o IdentitiesOnly=yes -i ~/.ssh/IdentityFile2 -a This makes submodules easy without the `insteadOf`

And if you have more than one SSH identity?

Sounds like a different problem.
Post reply on HN