Re: Trying to use insteadOf trick to use different SSH keys for separate github accounts - not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Dec 16, 2017 at 07:50:02AM +0000, Asfand Qazi wrote:

> I found out about the 'insteadOf' setting, and thought it would work.
> So I added this to my global git config:
> 
> [url "git@xxxxxxxxxx:MyCompany/"]
> insteadOf = git@xxxxxxxxxxxxxxx:MyCompany/
> 
> and left the SSH hostname setting where it was. Then I tried doing:
> 
> git clone git:github.com/MyCompany/la-repo.git
> 
> But it won't work. With GIT_TRACE=2, I get:

If I'm reading it right, you have the config backwards. You want to
convert git@xxxxxxxxxx from Go's invocation of Git into your special
"work" alias. So:

  [url "git@xxxxxxxxxxxxxxx:MyCompany/"]
  insteadOf = "git@xxxxxxxxxx:MyCompany/"

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux