Open alexandre1985 opened 5 years ago
Are you using Debian?
I'm using Manjaro Linux Deepin x64.
I installed pius
through Manjaro's repository
Sounds like Manjaro installed it as a py3 app instead of a py2 app, incorrectly. py3 support is experimental at best.
Your best get is just to pull down a git clone of the repo here, and then cd into the directory and do:
python2 pius
And run it directly from the source tree. Feel free to file a bug upstream againt Manjaro to repackage it properly as well.
We're working on PIUS 3.0 which will by full (and only) python 3.
I have download and build it from source.
I have cd
into pius-2.2.7
directory, run: python2 ./pius -s "B13A XXXX XXXX XXXX" "1D51 XXXX XXXX XXXX"
and I get this error:
pius: error: Keyring /home/me/.gnupg/pubring.gpg doesn't exist
Maybe run gpg
one time to create the key ring?
I have already have a gpg keyring. On ~/.gnupg/
there are (among others) pubring.kbx
and trustdb.gpg
files.
My gpg version is: 2.2.16
Ah yeah, it assumes the ring is in pubring, not keybox format. It should be smarter about that.
In the meantime, use -r
to point it to your keyring.
so it I should use -r ~/.gnupg
?
no, -r ~/.gnupg/pubring.kbx
;) :+1:
I'm have my secret key on a yubikey.
When running python2 ./pius -r ~/.gnupg/pubring.kbx -s "XXXX..." "XXXXX...."
I get this:
...
Have you verified this user/key, and if so, what level do you want to sign at?
0-3, Show again, Next, Help, or Quit? [0|1|2|3|s|n|h|q] (default: n) 0
Signing all UIDs on key XXXX.....
There are 3 UIDs on this key to sign
UID 1 (user@email.com): ERROR: Agent reported an error.
gpg-agent problems, bailing out!
You're using py3 again, please use py2.
Well, I'm not. I have tried running both:
python2 ./pius -r ~/.gnupg/pubring.kbx -s "XXX...." "XXXX......"
and
python2 pius -r ~/.gnupg/pubring.kbx -s "XXX...." "XXXX......"
and I still get the error above
Oh sorry I read the wrong error. Can you run it in debug mode? Do you have an agent running?
I have my pgp on a yubikey. Can you give the commands for me to give you the output?
Enviado através do ProtonMail móvel
-------- Mensagem Original -------- Ligado 20/06/2019, 00:15, Phil Dibowitz escreveu:
Oh sorry I read the wrong error. Can you run it in debug mode? Do you have an agent running?
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.
just run it again with -d
to get debug output.
I've never tried it with the key on a yubikey, not sure how well it'll work as it expects the agent to be able to load the key. My suspicion is that the agent says something we don't know about yet that is supposed to tell us to tell you to touch your yubikey. Debug output should help.
you can reproduce the setup with the Debian Subkeys approach: https://wiki.debian.org/Subkeys
We're "handling" this case in GNOME Keysign by ignoring it: https://gitlab.gnome.org/GNOME/gnome-keysign/issues/15
python2 ./pius -r ~/.gnupg/pubring.kbx -s "A6XXXXXXXXXXXXXX" "1DXXXXXXXXXXXXXX"
Have you verified this user/key, and if so, what level do you want to sign at?
0-3, Show again, Next, Help, or Quit? [0|1|2|3|s|n|h|q] (default: n) 0
Signing all UIDs on key 1DXXXXXXXXXXXXXX
DEBUG: Running: /usr/bin/gpg2 --keyid-format long --no-auto-check-trustdb -q --no-tty --batch --command-fd 0 --status-fd 1 --no-default-keyring --keyring /home/me/.gnupg/pubring.kbx --no-options --with-colons --edit-key 1DXXXXXXXXXXXXXX
DEBUG: Got a line [GNUPG:] KEY_CONSIDERED 50XXXXXXXXXXXXXXXXXXXXXX1DXXXXXXXXXXXXXX 0
DEBUG: Got a line pub:-:2048:1:1DXXXXXXXXXXXXXX:1400136652:1589538568::-:::sc
DEBUG: Got a line fpr:::::::::50XXXXXXXXXXXXXXXXXXXXXX1DXXXXXXXXXXXXXX:
DEBUG: Got a line sub:e:2048:1:8B76DAA995D0E6DC:1400136652:1526367052:::::e
DEBUG: Got a line fpr:::::::::F92881A08855A95FDF474F458B76DAA995D0E6DC:
DEBUG: Got a line uid:-::::::::Other Guy <other1@email.tld>:::S9 S8 S7 S3 H10 H9 H8 H11 Z2 Z3 Z1 Z0,mdc,no-ks-modify:1,p::
DEBUG: Got UID Other Guy <other1@email.tld> with status -
DEBUG: got email other1@email.tld
DEBUG: 1DXXXXXXXXXXXXXX__post_at_email.tld__A6XXXXXXXXXXXXXX isn't in []
DEBUG: Got a line uid:-::::::::Other Guy <other2@email.tld>:::S9 S8 S7 S3 H10 H9 H8 H11 Z2 Z3 Z1 Z0,mdc,no-ks-modify:2,::
DEBUG: Got UID Other Guy <other2@email.tld> with status -
DEBUG: got email other2@email.tld
DEBUG: 1DXXXXXXXXXXXXXX__bjorn_at_email.tld__A6XXXXXXXXXXXXXX isn't in ['1DXXXXXXXXXXXXXX__post_at_email.tld__A6XXXXXXXXXXXXXX']
DEBUG: Got a line uid:-::::::::Other Guy <other3@email.tld>:::S9 S8 S7 S3 H10 H9 H8 H11 Z2 Z3 Z1 Z0,mdc,no-ks-modify:3,::
DEBUG: Got UID Other Guy <other3@email.tld> with status -
DEBUG: got email other3@email.tld
DEBUG: 1DXXXXXXXXXXXXXX__bjorn_at_email.tld__A6XXXXXXXXXXXXXX isn't in ['1DXXXXXXXXXXXXXX__post_at_email.tld__A6XXXXXXXXXXXXXX', '1DXXXXXXXXXXXXXX__bjorn_at_email.tld__A6XXXXXXXXXXXXXX']
DEBUG: Got a line uat:-::::::::1 9828:::S9 S8 S7 S3 H10 H9 H8 H11 Z2 Z3 Z1 Z0,mdc,no-ks-modify:4,::
DEBUG: got to command prompt
DEBUG: quitting
DEBUG: waiting
There are 3 UIDs on this key to sign
DEBUG: exporting A6XXXXXXXXXXXXXX
DEBUG: Running: /usr/bin/gpg2 --keyid-format long --no-auto-check-trustdb -q --no-tty --batch --no-default-keyring --keyring /home/me/.gnupg/pubring.kbx --armor --output /tmp/pius-tmp/A6XXXXXXXXXXXXXX.asc --export A6XXXXXXXXXXXXXX
DEBUG: exporting 1DXXXXXXXXXXXXXX
DEBUG: Running: /usr/bin/gpg2 --keyid-format long --no-auto-check-trustdb -q --no-tty --batch --no-default-keyring --keyring /home/me/.gnupg/pubring.kbx --armor --output /tmp/pius-tmp/1DXXXXXXXXXXXXXX.asc --export 1DXXXXXXXXXXXXXX
UID 1 (other1@email.tld): DEBUG: importing A6XXXXXXXXXXXXXX
DEBUG: Running: /usr/bin/gpg2 --keyid-format long --no-auto-check-trustdb -q --no-tty --batch --no-default-keyring --keyring /tmp/pius-tmp/pius_keyring.gpg --import-options import-minimal,keep-ownertrust --import /tmp/pius-tmp/A6XXXXXXXXXXXXXX.asc
DEBUG: importing 1DXXXXXXXXXXXXXX
DEBUG: Running: /usr/bin/gpg2 --keyid-format long --no-auto-check-trustdb -q --no-tty --batch --no-default-keyring --keyring /tmp/pius-tmp/pius_keyring.gpg --import-options import-minimal --import /tmp/pius-tmp/1DXXXXXXXXXXXXXX.asc
DEBUG: Running: /usr/bin/gpg2 --keyid-format long --no-auto-check-trustdb -q --no-tty --batch --command-fd 0 --status-fd 1 --no-default-keyring --keyring /tmp/pius-tmp/pius_keyring.gpg -u A6XXXXXXXXXXXXXX --use-agent --default-cert-level 0 --no-ask-cert-level --edit-key 1DXXXXXXXXXXXXXX
DEBUG: Waiting for prompt
DEBUG: Waiting for line [GNUPG:] GET_LINE keyedit.prompt
DEBUG: got line [GNUPG:] KEY_CONSIDERED 50XXXXXXXXXXXXXXXXXXXXXX1DXXXXXXXXXXXXXX 0
DEBUG: Waiting for line [GNUPG:] GET_LINE keyedit.prompt
DEBUG: got line [GNUPG:] GET_LINE keyedit.prompt
DEBUG: Selecting UID 1
DEBUG: Waiting for ack
DEBUG: Waiting for line [GNUPG:] GOT_IT
DEBUG: got line [GNUPG:] GOT_IT
DEBUG: Running sign subcommand
DEBUG: Waiting for line [GNUPG:] GET_LINE keyedit.prompt
DEBUG: got line [GNUPG:] GET_LINE keyedit.prompt
DEBUG: Sending sign command
DEBUG: Waiting for line [GNUPG:] GOT_IT
DEBUG: got line [GNUPG:] GOT_IT
DEBUG: Waiting for response
DEBUG: Got [GNUPG:] KEY_CONSIDERED B8XXXXXXXXXXXXXXXXXXXXXXA6XXXXXXXXXXXXXX 0
DEBUG: Got KEY_CONSIDERED
DEBUG: Waiting for response
DEBUG: Got [GNUPG:] GET_BOOL sign_uid.okay
DEBUG: Confirming signing
DEBUG: Waiting for line [GNUPG:] GOT_IT
DEBUG: got line [GNUPG:] GOT_IT
DEBUG: Got [GNUPG:] ERROR keysig 67108881
ERROR: Agent reported an error.
gpg-agent problems, bailing out!
My yubikey needs a touch for encryption and signing. It did not ask for such touch (running this command).
Sorry I never responded to this. My guess is we'll have to do some extra work to support interaction-required key-storage. I would have thought that the agent would sorta handle that, but I guess not.
That said, with the DDOS's on the keyservers, and the significant disagreement between the gpg client developer and the new DDOS-resistant keyservers that have made using them near-impossible, I stopped using gpg to sign my email, and stopped running KSPs a few years back, and as such, haven't been very focused on PIUS. So changes of me addressing this soon are pretty low. I will, of course, be happy to help others who are interested in working on it, and I will review PRs in a timely fashion.
When running
pius -s "...." "...."
I get this error:and if I change
/usr/bin/pius
shebang to#!/usr/bin/python2
I get this error:I need this fixed. Thank you