You are not logged in.
Pages: 1
Topic closed
Getting errors when trying to create a new gpg key. The gpg-agent is running
Any help would be appreciated.
[decrypter@sftp /]$ gpg --gen-key
gpg (GnuPG) 2.1.9; Copyright (C) 2015 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Note: Use "gpg2 --full-gen-key" for a full featured key generation dialog.
GnuPG needs to construct a user ID to identify your key.
Real name: Decrypter
Email address:
You selected this USER-ID:
"Decrypter"
Change (N)ame, (E)mail, or (O)kay/(Q)uit? O
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
gpg: agent_genkey failed: Permission denied
Key generation failed: Permission denied
[decrypter@sftp /]$ ps -ef |grep gpg
decrypt+ 2938 1 0 12:53 ? 00:00:00 gpg-agent --homedir /home/decrypter/.gnupg --use-standard-socket --daemon
Offline
What are the outputs of mount
Is decrypter your user name (and are you logged in as them)?
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
yes, the username is decrypter, and i am logged in as that user.
The output on the mount command is below.
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=2023488k,nr_inodes=505872,mode=755)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
/dev/sda1 on / type ext3 (rw,relatime,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=34,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
/dev/sda3 on /home type ext3 (rw,relatime,data=ordered)
tmpfs on /run/user/1001 type tmpfs (rw,nosuid,nodev,relatime,size=405228k,mode=700,uid=1001,gid=1002)
Offline
So much for the low hanging fruit. Obviously I was ensuring you had permissions to write the keys. I assume you have permission to write to /home/decrypter/.gnupg
You might prove that you do. Aside from that, I've no more ideas.
BTW, Welcome to Arch Linux.
You might want to brush up on your BBCode and use code tags around program output. You can edit your posts. That link is also below all the message post boxes on the forums.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
gpg: agent_genkey failed: Permission denied
Key generation failed: Permission denied
I had the same problem and fixed it by changing ownership of the terminal to root (I had logged in as another user and su'd to root).
# ls -l $(tty)
crw--w---- 1 nobby tty 136, 1 Jan 11 21:30 /dev/pts/1
# chown root $(tty)
# ls -l $(tty)
crw--w---- 1 root tty 136, 1 Jan 11 21:30 /dev/pts/1
#
Found the answer here https://github.com/allejok96/syncroot/tree/master
Last edited by nobby (2016-01-12 13:16:11)
Offline
I believe gnupg will not let you use it when being su'd from root to another user. I believe i was having this error when i was doing that.
Offline
I fix this on remote servers (where I su - to root) by adding to my ~/.profile or ~/.bashrc
# Set GPG TTY
chown root:root $(tty)
export GPG_TTY=$(tty)
this fixes permission denied problems with gnupg / pinentry.
Offline
Offline
Pages: 1
Topic closed