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

Re: git-receive-pack doesn't seem to respect gpg.program config

From
Jeff King <peff@peff.net>
Date
Oct 26, 2020, 19:36 UTC
Message-ID
<20201026193644.GA16150@coredump.intra.peff.net>
In-Reply-To
<20201026181625.c6f5y44ydndkniul@chatter.i7.local>
On Mon, Oct 26, 2020 at 02:16:25PM -0400, Konstantin Ryabitsev wrote:
Show 7 quoted lines
> While trying to configure signed pushes, I found out that no mater where 
> I set gpg.program=/opt/gnupg22/bin/gpg (in-repo config, ~/.gitconfig, 
> /etc/gitconfig), git-receive-pack didn't appear to be paying any 
> attention to that setting and always used the "gpg" command in the PATH.
> 
> Not sure if that's intentional or not, but seems like it should be 
> paying attention at least to /etc/gitconfig.
I suspect it just needs:
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index bb9909c52e..2a41b24e5a 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -248,6 +248,10 @@ static int receive_pack_config(const char *var, const char *value, void *cb)
 		return 0;
 	}
 
+	status = git_gpg_config(var, value, cb);
+	if (status)
+		return status;
+
 	return git_default_config(var, value, cb);
 }
 

but didn't test or look further than that.

-Peff
Previous: Konstantin Ryabitsev
Message 2 of 2 in “git-receive-pack doesn't seem to respect gpg.program config”
  1. Konstantin RyabitsevOct 26, 2020
  2. Jeff KingOct 26, 2020

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.