1

I've stumbled upon an interesting case with setting up gpg on Mac OS:

gpg: failed to create temporary file '/Users/pprazak/.gnupg/.#lk0x000060000145c100.NAME WITH SPACES.53297': No such file or directory

Please advice on solutions.

I've already tried:

sudo chown -R $USER:staff ~/.gnupg
chmod 600 ~/.gnupg/*
chmod 700 ~/.gnupg/

and:

export GPG_TTY=$(tty)
gpgconf --launch gpg-agent

1 Answer 1

1

The temporary file that gpg uses for locks is derived from the hostname:

$ hostname
NAME WITH SPACES

I've fixed the issue using:

scutil --set HostName NAME-WITH-NO-SPACES
scutil --set LocalHostName NAME-WITH-NO-SPACES
scutil --set ComputerName NAME-WITH-NO-SPACES
dscacheutil -flushcache

After that gpg is working as expected.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .