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>, git <git@vger.kernel.org>
Subject: Bug: send-pack does not respect http.signingkey
Date: Thu, 16 Jul 2015 12:45:16 -0700	[thread overview]
Message-ID: <CAD0k6qQ=ovEBZn_wje-exBhvW8brRbTgULDr68rmeiw-ZdsozQ@mail.gmail.com> (raw)

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.

---
 gpg-interface.c | 1 +
 run-command.c   | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/gpg-interface.c b/gpg-interface.c
index 68b0c81..e0ffcb0 100644
--- a/gpg-interface.c
+++ b/gpg-interface.c
@@ -87,6 +87,7 @@ void set_signing_key(const char *key)
 int git_gpg_config(const char *var, const char *value, void *cb)
 {
  if (!strcmp(var, "user.signingkey")) {
+ fprintf(stderr, "setting %s\n", value);
  set_signing_key(value);
  }
  if (!strcmp(var, "gpg.program")) {
diff --git a/run-command.c b/run-command.c
index 4d73e90..39ae8d5 100644
--- a/run-command.c
+++ b/run-command.c
@@ -1,5 +1,6 @@
 #include "cache.h"
 #include "run-command.h"
+#include "gpg-interface.h"
 #include "exec_cmd.h"
 #include "sigchain.h"
 #include "argv-array.h"
@@ -344,7 +345,7 @@ fail_pipe:
  cmd->err = fderr[0];
  }

- trace_argv_printf(cmd->argv, "trace: run_command:");
+ trace_argv_printf(cmd->argv, "trace: run_command (%s):", get_signing_key());
  fflush(NULL);

 #ifndef GIT_WINDOWS_NATIVE
-- 
2.4.3.573.g4eafbef

             reply	other threads:[~2015-07-16 19:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-16 19:45 Dave Borowitz [this message]
2015-07-16 20:06 ` Bug: send-pack does not respect http.signingkey Junio C Hamano
2015-07-16 20:08   ` Dave Borowitz
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='CAD0k6qQ=ovEBZn_wje-exBhvW8brRbTgULDr68rmeiw-ZdsozQ@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).