Because sudo doesn't carry over: In the example command you gave, gpg using being run as root but when piped into apt-key, apt-key is running as you and not root. The correct way would be to put the sudo after the pipe, resulting in:

gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -

Reply via email to