summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-07-21 15:06:43 -0700
committerJunio C Hamano <gitster@pobox.com>2015-07-21 15:24:27 -0700
commitd830d395a17a146cfef2aae1c3603907fe3c890b (patch)
tree4384aa7cebf26beeb2ea882a80493d69b4f2f1e5
parentbb3e7b1a5505bae590b0d85a3995a61d6dd82547 (diff)
downloadgit-db/send-pack-user-signingkey.tar.gz
builtin/send-pack.c: respect user.signingkeydb/send-pack-user-signingkey
When git-send-pack is exec'ed, as is done by git-remote-http, it does not read the config, and configured value of user.signingkey is ignored. Thus it was impossible to specify a signing key over HTTP, other than the default key in the keyring having a User ID matching the "Name <email>" format. This patch at least partially fixes the problem by reading in the GPG config from within send-pack. It does not address the related problem of plumbing a value for this configuration option using `git -c user.signingkey push ...`. Signed-off-by: Dave Borowitz <dborowitz@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin/send-pack.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/send-pack.c b/builtin/send-pack.c
index b961e5ae78..23b2962cb0 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] [--atomic] [<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;