git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Cc: git@vger.kernel.org
Subject: Re: git-receive-pack doesn't seem to respect gpg.program config
Date: Mon, 26 Oct 2020 15:36:44 -0400	[thread overview]
Message-ID: <20201026193644.GA16150@coredump.intra.peff.net> (raw)
In-Reply-To: <20201026181625.c6f5y44ydndkniul@chatter.i7.local>

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

      reply	other threads:[~2020-10-26 19:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201026193644.GA16150@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=konstantin@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).