Wednesday, May 17, 2017

gpg: agent_genkey failed: Permission denied

$ gpg2 --gen-key

// On Ubuntu
gpg: agent_genkey failed: Permission denied
Key generation failed: Permission denied

// On CentOS
gpg: cancelled by user
gpg: Key generation canceled.

Solution:

$ ls -la $(tty)

crw--w----. 1 someone tty 136, 9 May 17 20:47 /dev/pts/9

$ sudo chown MyUserName /dev/pts/9

$ gpg2 --gen-key

No comments: