can not encrypt (but decrypt) dues to missing pub key
Matthias Apitz
guru at unixarea.de
Wed Apr 1 19:39:24 CEST 2020
El día Mittwoch, April 01, 2020 a las 06:59:17 +0200, Ingo Klöcker escribió:
> On Mittwoch, 1. April 2020 17:30:29 CEST Matthias Apitz wrote:
> > I encounter in my server the following situation: I can decrypt files
> > but not encrypting any file:
> >
> > $ gpg2 --version
>
> Here you are using gpg2.
>
> >
> > $ gpg -d sybase.gpg
>
> Now you are using gpg.
Sorry for this confusion. gpg is just a symlink to gpg2:
$ which gpg
/usr/local/bin/gpg
$ which gpg2
/usr/local/bin/gpg2
$ ls -l /usr/local/bin/gpg /usr/local/bin/gpg2
lrwxr-xr-x 1 root wheel 4 27 mar. 2017 /usr/local/bin/gpg -> gpg2
-r-xr-xr-x 1 root wheel 903648 5 mar. 2017 /usr/local/bin/gpg2
> > $ gpg2 -r guru at unixarea.de -ea test
>
> Here you are using gpg2 again. My guess is that the second call uses gpg 1.x
> and a different home (including a different key ring).
>
> > It seems that there is the file pubring.gpg missing:
>
> Of course, because pubring.gpg is the public key container of gpg <2.
Ok, this explains its absence.
>
> > $ ls -ltr /home/guru/.gnupg-v2.1.19
> > total 36
> > -rw------- 1 guru wheel 32 11 mar. 2018 pubring.kbx~
> > -rw-r--r-- 1 guru wheel 1396 11 mar. 2018 pubring.kbx
>
> pubring.kbx holds the public keys of gpg2.
Ok, but why encryption does not work? As you see the file pubring.kbx is
not changed since it was created.
matthias
--
Matthias Apitz, ✉ guru at unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
More information about the Gnupg-users
mailing list