funtoo / keychain

keychain ssh-agent front-end
http://www.funtoo.org
GNU General Public License v2.0
757 stars 108 forks source link

keychain can't use gpg v2 #69

Closed dinojr closed 7 years ago

dinojr commented 8 years ago

It seems the output of gpg -k changed in gpg v2: it displays the whole 40-something digits of the key. Since keychain uses this output, the 8 digits used in the examples of http://www.funtoo.org/Keychain don't work anymore. For my setup (gpg 2.11.15 on Ubuntu 16.10) , the following patch fixes this problem:

*** /usr/bin/keychain   2016-10-27 00:35:13.992931873 +0200
--- /usr/bin/keychain~  2015-09-14 10:02:06.000000000 +0200
***************
*** 1076,1082 ****
        # Check for gpg
        if wantagent gpg; then
            if [ -z "$pm_gpgsecrets" ]; then
!               pm_gpgsecrets="`gpg --list-secret-keys 2>/dev/null | cut -d/ -f2 | cut -d' ' -f7 | xargs`"
                [ -z "$pm_gpgsecrets" ] && pm_gpgsecrets='/'    # arbitrary
            fi
            case " $pm_gpgsecrets " in *" $pm_k "*)
--- 1076,1082 ----
        # Check for gpg
        if wantagent gpg; then
            if [ -z "$pm_gpgsecrets" ]; then
!               pm_gpgsecrets="`gpg --list-secret-keys 2>/dev/null | cut -d/ -f2 | cut -d' ' -f1 | xargs`"
                [ -z "$pm_gpgsecrets" ] && pm_gpgsecrets='/'    # arbitrary
            fi
            case " $pm_gpgsecrets " in *" $pm_k "*)
](url)
danielrobbins commented 7 years ago

This issue has been imported into the Funtoo Linux bug tracker. This helps us to ensure that your bug is prioritized and gets the attention it deserves. You are welcome to create a Funtoo account and participate in the Funtoo Linux workflow or follow-up in the GitHub issue (comments are not currently synchronized.) Follow the action here: https://bugs.funtoo.org/browse/FL-3413

ghost commented 7 years ago

This should be fixed in 2.8.4 , I tested on an ubuntu system with the newly added --gpg2 flag and the 8 digit id worked fine. If you still have this issue with 2.8.4 then please open a new issue. Thanks.