From 5e090e019bd05c03642a9074d07f703445d99d81 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 24 Jan 2013 17:17:56 +0000 Subject: read_config: only pick first key for each key id --- git-remote-gcrypt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'git-remote-gcrypt') diff --git a/git-remote-gcrypt b/git-remote-gcrypt index e12d355..df00ddc 100755 --- a/git-remote-gcrypt +++ b/git-remote-gcrypt @@ -364,6 +364,9 @@ read_config() for recp_ in $conf_part do key_line=$(gpg --with-colons --fast-list -k "$recp_" | xgrep ^pub) + isnonnull "${key_line##*"$Newline"*}" || + echo_info "WARNING: '$recp_' matches multiple keys, using one" + key_line=${key_line%%"$Newline"*} keyid_=$(xecho "$key_line" | cut -f 5 -d :) isnonnull "$keyid_" && -- cgit v1.2.3