New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gpg: Sorry, no terminal at all requested - can't get input #18

Closed
vladzaets opened this Issue Apr 3, 2015 · 9 comments

Comments

Projects
None yet
3 participants
@vladzaets

vladzaets commented Apr 3, 2015

Not working for me in both "native" and "pass" modes.

In "native git/gpg" I get this error – "gpg: Sorry, no terminal at all requested - can't get input". As I looked up in google I should remove "no-tty" string from gpg config file, but in my config there is no such string.
error1

After installing gpg2 and pointing gpg exec to "/usr/local/bin/gpg2", I get this error:
error3

In "pass" mode the window just freezes.
error2

@rdoeffinger

This comment has been minimized.

Contributor

rdoeffinger commented Apr 6, 2015

I think you are using a key with passphrase, so GPG must get that from you.
Since the terminal isn't connected to anywhere we use --no-tty (I think we really don't want to handle passphrase input from qtpass).
However in the version you use --use-agent is added as well.
But for some reason (looking at the output in the second screenshot) gpg-agent claims that you cancelled the passphrase input dialog.
I assume that you didn't in which case I suspect something i your setup breaks gpg-agent requesting the passphrase from you (I think it should normally call the pinentry tool).
So I suspect this issue somewhere in the setup far outside qtpass itself, maybe you can debug it further with this information?

@rdoeffinger

This comment has been minimized.

Contributor

rdoeffinger commented Apr 6, 2015

Also, in pass mode I suspect it hangs because it tries to read the passphrase from the terminal, which is not connected. And lastly, I have tested key with both passphrases and keys on smartcards with PINs to work on Linux (default gpg setup) and Windows (gpg4win) at least, so it is at least not generally broken...

@annejan

This comment has been minimized.

Member

annejan commented Apr 7, 2015

Unfortunately I can't test on OsX currently . .
Can confirm passphrase and smartcard to work on Linux too.

@annejan

This comment has been minimized.

Member

annejan commented May 2, 2015

Most of these issues are fixed, all except for one.

The freezing is caused by an upstream bug in pass when (in my case) using a GPG smart-card and not having it inserted. I have a pull request waiting to fix this https://github.com/zx2c4/password-store/pull/14

When the fix is merged and propagated to at-least the Linux distributions I use and Homebrew OSX, I'll close this issue.

@annejan annejan self-assigned this May 2, 2015

@vladzaets

This comment has been minimized.

vladzaets commented May 4, 2015

I still experience all of this issues.

@annejan

This comment has been minimized.

Member

annejan commented May 4, 2015

The second screenshot gives a hint.
Your GPG secret key cannot be found by the GPG sub-system.

Could you help me debugging this by giving me some more information on your setup?
Does pass (in the command line) work for you?

Unfortunately the pass locking issue (third screenshot) is caused by pass itself, using my fork of pass solved that issue for me. https://github.com/annejan/password-store

It looks to me like there is something "wrong" with the execution environment that causes GPG to not find your secret key. I will have a deeper look into this, since I now have a mac OS environment to test in again, any information on your setup you can give will help me fix this issue.

I have just found out that on a test account I have created this happens when I start QtPass from the Applications thing which is apparently the way things work on a Mac.
It indeed seems that there are some environment variable missing or something. Interesting issue.

Starting QtPass from the Terminal ( open QtPass.app ) or from QtCreator and everything works normally, this makes debugging a bit awkward . .

This is indeed a showstopper as "normal" Mac users would just drag and drop the application into the Applications thing.

@annejan

This comment has been minimized.

Member

annejan commented May 5, 2015

Apparently using /usr/local/MacGPG2/bin/gpg2 as the pass executable in the configuration menu works a lot better than the /usr/local/bin/gpg . .
screen shot 2015-05-05 at 03 21 52

Or in the latest develop version https://github.com/IJHack/qtpass/tree/develop by removing the gpg executable from the configuration and restarting the application.
I'm also setting the PATH to include the /usr/local/MacGPG2/bin/ and /usr/local/bin path on Mac OS . .
This will need some more testing and cleanup.

Please try and test this build if you don't want to wait: https://annejan.com/media/qtpass.dmg

@vladzaets

This comment has been minimized.

vladzaets commented May 5, 2015

Yes, the pass in the command line does work for me.

When I execute this command 'open /Users/vladislavzaets/Downloads/qtpass-master-2/QtPass.app' it still doesn't work.

I don't have such directory /usr/local/MacGPG2/

@annejan

This comment has been minimized.

Member

annejan commented May 5, 2015

I am convinced it is a path issue in the QProcess, will have a deeper look tomorrow.
The development branch should now also work with gpg2 installed in /usr/local/bin

I have uninstalled MacGPG2 and installed http://sourceforge.net/p/gpgosx/docu/Download/
Working with gpg I get asked for my PIN . . This is not something I can easily wrap with QtPass.
On my other test account it asks for my passphrase, also something that will be extremely hard to wrap.
With this version of GPG I can't seem to get the integration in mail working either.
Also pass itself freezes on me in the Terminal . .

For now I'm concluding that QtPass on Mac only works with the https://gpgtools.org/ version of GPG.
Will add that to the README too.

@annejan annejan closed this Aug 3, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment