Re: Use different ssh keys for different github repos (per-url sshCommand)

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

 



On Thu, Jul 19, 2018 at 02:50:16PM +0200, Ævar Arnfjörð Bjarmason wrote:

> > I thought of writing a wrapper script to deduce the key from the arguments:
> >
> >     git@xxxxxxxxxx git-upload-pack '/theorganization/privaterepo.git'
> >
> > Is this the only option?
> 
> Yes, I had a similar problem a while ago (which I sent an RFC patch for)
> which shows a script you can use:
> https://public-inbox.org/git/20180103102840.27897-1-avarab@xxxxxxxxx/
> 
> It would be nice if this were configurable. Instead of the way you
> suggested, it would be more general if we supported:
> 
>     [Include "remote:git@xxxxxxxxxx:theorganization*"]
>     path = theorganization.config
> 
> Although I'm sure we'd have some interesting chicken & egg problems
> there when it comes to bootstrapping the config parsing.

I don't think we'd ever support this via the include mechanism. The
idea of "which remote are we looking at" is specific to a particular
part of an operation. Whereas config parsing is generally process-wide,
so it has to be based on a property of the whole process (like "which
directory are we in"). Maybe that's what you meant by chicken and egg.

If we were to make this more configurable, it would probably be more
like existing http.* config, which loads all the config, but then does
URL-specific matching when applying the config to a particular
operation.

-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