git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git-receive-pack doesn't seem to respect gpg.program config
@ 2020-10-26 18:16 Konstantin Ryabitsev
  2020-10-26 19:36 ` Jeff King
  0 siblings, 1 reply; 2+ messages in thread
From: Konstantin Ryabitsev @ 2020-10-26 18:16 UTC (permalink / raw)
  To: git

Hi, all:

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.

-K

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: git-receive-pack doesn't seem to respect gpg.program config
  2020-10-26 18:16 git-receive-pack doesn't seem to respect gpg.program config Konstantin Ryabitsev
@ 2020-10-26 19:36 ` Jeff King
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2020-10-26 19:36 UTC (permalink / raw)
  To: Konstantin Ryabitsev; +Cc: git

On Mon, Oct 26, 2020 at 02:16:25PM -0400, Konstantin Ryabitsev wrote:

> 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-26 19:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-26 18:16 git-receive-pack doesn't seem to respect gpg.program config Konstantin Ryabitsev
2020-10-26 19:36 ` Jeff King

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).