git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Dave Borowitz <dborowitz@google.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git <git@vger.kernel.org>
Subject: Re: Bug: send-pack does not respect http.signingkey
Date: Thu, 16 Jul 2015 13:08:40 -0700	[thread overview]
Message-ID: <CAD0k6qS_uQk5KZVJYA7BVZ9sRPRj=cZ3rbYRfJ3vhgSh2drEMA@mail.gmail.com> (raw)
In-Reply-To: <xmqqlhef50kz.fsf@gitster.dls.corp.google.com>

On Thu, Jul 16, 2015 at 1:06 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Dave Borowitz <dborowitz@google.com> writes:
>
>> When git-send-pack is exec'ed, as is done by git-remote-http, it does
>> not reread the config, so it does not respect the configured
>> http.signingkey, either from the config file or -c on the command
>> line. Thus it is currently impossible to specify a signing key over
>> HTTP, other than the default one matching the "Name <email>" format in
>> the keyring.
>>
>> This is not an issue for git:// as send-pack is executed directly in
>> the same process that reads the config.
>
> Interesting.  I agree that it would be a problem not to be able to
> specify which signing key to use.
>
> Perhaps something like this?

Seems like it should work.

Jonathan had suggested there might be some principled reason why
send-pack does not respect config options, and suggested passing it in
as a flag. But that would be more work, certainly, as it would also
have to get passed through git-remote-http somehow.

> diff --git a/builtin/send-pack.c b/builtin/send-pack.c
> index b564a77..57c3a9c 100644
> --- a/builtin/send-pack.c
> +++ b/builtin/send-pack.c
> @@ -11,6 +11,7 @@
>  #include "transport.h"
>  #include "version.h"
>  #include "sha1-array.h"
> +#include "gpg-interface.h"
>
>  static const char send_pack_usage[] =
>  "git send-pack [--all | --mirror] [--dry-run] [--force] [--receive-pack=<git-receive-pack>] [--verbose] [--thin] [<host>:]<directory> [<ref>...]\n"
> @@ -113,6 +114,8 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
>         int from_stdin = 0;
>         struct push_cas_option cas = {0};
>
> +       git_config(git_gpg_config, NULL);
> +
>         argv++;
>         for (i = 1; i < argc; i++, argv++) {
>                 const char *arg = *argv;

  reply	other threads:[~2015-07-16 20:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-16 19:45 Bug: send-pack does not respect http.signingkey Dave Borowitz
2015-07-16 20:06 ` Junio C Hamano
2015-07-16 20:08   ` Dave Borowitz [this message]
2015-07-16 20:12     ` Junio C Hamano
2015-07-16 20:31       ` Dave Borowitz
2015-07-16 21:10         ` Junio C Hamano
2015-07-16 22:08           ` Dave Borowitz
2015-07-21 19:25             ` Dave Borowitz
2015-07-21 19:33               ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAD0k6qS_uQk5KZVJYA7BVZ9sRPRj=cZ3rbYRfJ3vhgSh2drEMA@mail.gmail.com' \
    --to=dborowitz@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).