I am trying to install Tor Browser following this guide:
https://2019.www.torproject.org/docs/debian.html.en on Ubuntu 18.04.3 TLS.
When running the following command:
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add -
I get the error message below:
E: This command can only be used by root.
When I run the same command using sudo, I get the following message:
gpg: WARNING: unsafe ownership on homedir '/home/user/.gnupg'
E: This command can only be used by root.
Does anyone know how to fix it and why it is happening?
gpgwhich is then piped to yourapt-keyso when you mentionsudoI wonder if how you used it as you were unclear. More so though, I wonder what is the owner of ~/.gnupg (whether in priorsudocommands you've changed ownership to root instead of your user id) thus your permissions error.. – guiverc Aug 21 '19 at 12:50