keybase / client

Keybase Go Library, Client, Service, OS X, iOS, Android, Electron
BSD 3-Clause "New" or "Revised" License
8.92k stars 1.23k forks source link

pgp gen --multi hangs #3929

Open hardillb opened 8 years ago

hardillb commented 8 years ago

Hi,

I'm trying to generate a new pgp key using keybase pgp gen --multi

$ keybase pgp gen --multi
Enter your real name, which will be publicly visible in your new key: Ben Hardill
Enter a public email address for your key: xxxxx@gmail.com
Enter another email address (or <enter> when done): 
Push an encrypted copy of your new secret key to the Keybase.io server? [Y/n] n

I then get nothing more, I've left it for a good 10mins and still nothing. I've ended up killing it with crtl-c

Running on Fedora 23 x86_64 keybase version 1.0.17-20160812160036+d206db9

maxtaco commented 8 years ago

Thanks for the bug report. I've never seen this one before. Can you issue a keybase log send? Thanks!

hardillb commented 8 years ago

Sure, on it's way. (any way I can see the log locally, just curious - I found the logs in ~/.cache/keybase)

hardillb commented 8 years ago

Log ID: e4c9357395f7ac2c9322971c

maxtaco commented 8 years ago

Sure thing, it's ~/.cache/keybase/keybase.service.log

maxtaco commented 8 years ago

Hmm, didnt' see anything in the logs. Can you also try:

keybase -d pgp gen --multi

And let me know what happened there?

Thanks

hardillb commented 8 years ago

Done,

Looking at the last lines of the log I would guess it's waiting on a passphrase but it's not prompted for one, I tried entering one into the terminal but it echoed to the screen and still didn't move on.

keybase.txt

maxtaco commented 8 years ago

Ah ok, that's making more sense. How did you install keybase?

hardillb commented 8 years ago

With the RPM iirc, dnf has been installing updates at regular intervals

maxtaco commented 8 years ago

CC: @oconnor663, he can help with linux installation issues!

maxtaco commented 8 years ago

Also, for now, what happens if you keybase login first, and then try?

hardillb commented 8 years ago

keybase login seams to hang as well

maxtaco commented 8 years ago

how about keybase login --pinentry=none?

hardillb commented 8 years ago
$ keybase login --pinentry=none
Incorrect Usage.

NAME:
   keybase login - Establish a session with the keybase server

USAGE:
   keybase login [command options] [username]

OPTIONS:
   --provision-by-email Use an email address associated with a keybase account to provision a device

Error parsing command line arguments: flag provided but not defined: -pinentry
maxtaco commented 8 years ago

Sorry I meant:

keybase --pinentry=none login
hardillb commented 8 years ago

Still hangs

maxtaco commented 8 years ago

ok, I'll let @oconnor663 help you out

hardillb commented 8 years ago

I just quit the tray app and ran keybase login again and things seam to have worked.

I can now run keybase pgp --multi and get the expected output

oconnor663 commented 8 years ago

I'm glad it's working, though now I'm worried about why the GUI wasn't showing you a pinentry. Is it possible it was spawning a window but not foregrounding it properly?

hardillb commented 8 years ago

The only thing I can think is that dnf update upgraded it and the GUI didn't get restarted

oconnor663 commented 8 years ago

Could be. The run_keybase script force-restarts everything, including the GUI, though we don't run that during package updates. (Mainly because updates run as root and not as your user, though also because we don't want leave applications using KBFS in a bad state without asking you.)

If you do run_keybase (or click our app menu entry, which amounts to the same thing) and wait for the GUI to come back up, does pinentry break again? Or do you start seeing our GUI password prompts this time?

hardillb commented 8 years ago

There were no hidden windows, I had a good look at the time.

It is very probable that there had been multiple updates since I last restarted the box or ran run_keybase so there could have been big gap between the running gui version and the command line.

Anyway it all seams to be working since yesterday, so we may just have to let this one go for now. If it comes back I'll try and grab as many details as possible.

adoyle-h commented 5 years ago

Same problem.

> keybase pgp gen --multi
Enter your real name, which will be publicly visible in your new key: ADoyle
Enter a public email address for your key: adoyle.h@gmail.com
Enter another email address (or <enter> when done):
Push an encrypted copy of your new secret key to the Keybase.io server? [Y/n]
When exporting to the GnuPG keychain, encrypt private keys with a passphrase? [Y/n]
▶ INFO PGP User ID: ADoyle <adoyle.h@gmail.com> [primary]
▶ INFO Generating primary key (4096 bits)
▶ INFO Generating encryption subkey (4096 bits)
▶ ERROR Operation timed out

I have run keybase log send and get my log id: 3db33a5e94276ad5d842b11c


I find the problem. When I typed keybase pgp gen --multi in full screen terminal. The GUI window jumped out but not got focused, while I was waiting for keybase pgp gen done in terminal. Now I have generated my pgp keys.