I'm trying to migrate a (PHP) software module into a new server (from a CentOS 6.9 to an Ubuntu 16.04). In a certain part of a process, the code tries to launch the following command:
gpg --no-tty --sign --encrypt --armor --passphrase=whatever --local-user A188E1E4! --recipient A188E1E4
So I'm trying to export the private/public key pair from the working server.
I'm stuck at this point, I've tried to manage it with this very similar question but I don't know the name and path where the key should be.
I've tried to run gpg --list-keys
but:
gpg: directory '/home/my-username/.gnupg' created
gpg: new configuration file /home/my-username/.gnupg/gpg.conf' created
gpg: WARNING: options in '/home/my-username/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring '/home/my-usernameo/.gnupg/pubring.gpg' created
gpg: /home/my-username/.gnupg/trustdb.gpg: trustdb created
I don't know which user is the code using to launch the command. Maybe I would need a way to list all the keys, not only the current user, so I can see which key I need to export.