Page MenuHome GnuPG

Doesn't import secret key on console mode
Closed, ResolvedPublic

Description

A time ago I did have tried to import my secret key to my ArchLinux system but I
can't. Tried to use --import and --allow-secret-key-import too but both
don't work. I was using my system only console mode, without X server.

A while later I needed install X server and remembered to try import the secret
key. And, works!

So, the problem is: GPG use a graphical window to user insert his passprhase.
When use only console mode (a user that have old customs or in a server) this
window can't appear and GPG doesn't import a secret key.

Possible solution: change the graphical window for a cursos like passwd.

Event Timeline

gpg doesn't normally directly ask for a password. Instead, operations that
require a password are typically handled by gpg-agent, which is a small server
that is started on demand. (Normally, there is only a single gpg-agent per
user.) When gpg-agent needs a password, it invokes a pinentry program. The
default pinentry can be determined using `gpgconf --list-config'. This can be
overridden using the pinentry-program configuration option in gpg-agent.conf.
(If you change that file, you'll need to restart gpg-agent using something like
`gpgconf --reload gpg-agent'.)

There are several different pinentry programs: pinentry-gtk-2, pinentry-qt,
pinentry-curses and pinentry-tty. (pinentry is typically an alias that is
configured by the system's package manager.) Even if you use pinentry-gtk-2, it
will normally fall back the curses backend if there is no X display.

The issue you might be having is that pinentry might be showing up on a
different display / console.

So, I think this might just be a configuration problem. Nevertheless, I
encourage you to investigate some more and try to figure out what is going on
and report back here. Thanks!

werner claimed this task.
werner added a project: Not A Bug.