Skip to content

Commit ab7a23e

Browse files
committed
gnupg-with-gpgkey: allow running on Ubuntu
In Git for Windows, we explicitly forbit Git from passing the `--status-fd=2` option to GPG. But on Ubuntu, that option is passed, and it is rather crucial because Git reads the status from `stderr` and is a bit miffed if it does not get any status update there. The symptom is: error: gpg failed to sign the data error: unable to sign the tag Let's prepare the script to allow for that option to be passed (and also allow for that option _not_ to be passed). Signed-off-by: Johannes Schindelin <[email protected]>
1 parent dc86a16 commit ab7a23e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

gnupg-with-gpgkey.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,19 @@
99
# using secret variables, of course).
1010

1111
case "$1" in
12+
--status-fd=*)
13+
status_fd="$1"
14+
arg1="$2"
15+
;;
16+
*)
17+
status_fd=
18+
arg1="$1"
19+
;;
20+
esac
21+
22+
case "$arg1" in
1223
-bsau)
13-
eval gpg --batch --yes --no-tty --pinentry-mode loopback -bsau $GPGKEY
24+
eval gpg --batch --yes --no-tty --pinentry-mode loopback $status_fd -bsau $GPGKEY
1425
;;
1526
--detach-sign)
1627
case "$*" in

0 commit comments

Comments
 (0)