git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Bug: send-pack does not respect http.signingkey

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 16, 2015, 20:06 UTC
Message-ID
<xmqqlhef50kz.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CAD0k6qQ=ovEBZn_wje-exBhvW8brRbTgULDr68rmeiw-ZdsozQ@mail.gmail.com>
Dave Borowitz <dborowitz@google.com> writes:
Show 9 quoted lines
> 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?
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;
Previous: Dave BorowitzNext: Dave Borowitz
Message 2 of 9 in “Bug: send-pack does not respect http.signingkey”
  1. Dave BorowitzJul 16, 2015
  2. Junio C HamanoJul 16, 2015
  3. Dave BorowitzJul 16, 2015
  4. Junio C HamanoJul 16, 2015
  5. Dave BorowitzJul 16, 2015
  6. Junio C HamanoJul 16, 2015
  7. Dave BorowitzJul 16, 2015
  8. Dave BorowitzJul 21, 2015
  9. Junio C HamanoJul 21, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.