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

Bug: send-pack does not respect http.signingkey

From
Dave Borowitz <dborowitz@google.com>
Date
Jul 16, 2015, 19:45 UTC
Message-ID
<CAD0k6qQ=ovEBZn_wje-exBhvW8brRbTgULDr68rmeiw-ZdsozQ@mail.gmail.com>

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
Next: Junio C Hamano
Message 1 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.