2

just tried to install a key from acestream (Ubuntu 14.04). This command doesn't work for me:

sudo wget -O - http://repo.acestream.org/keys/acestream.public.key | sudo apt-key add -

The key is showed in terminal but not in "apt-key list" ..

[sudo] password for phil: 
--2014-11-30 14:50:00--  http://repo.acestream.org/keys/acestream.public.key
Auflösen des Hostnamen »repo.acestream.org (repo.acestream.org)«... 77.120.105.88
Verbindungsaufbau zu repo.acestream.org (repo.acestream.org)|77.120.105.88|:80... verbunden.
HTTP-Anforderung gesendet, warte auf Antwort... 200 OK
Länge: 1756 (1,7K) [application/octet-stream]
In »»STDOUT«« speichern.

 0% [                                       ] 0           --.-K/s              -----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.10 (GNU/Linux)

mQENBE/4EYYBCAC8V7kMXJItHrtRItyS4ujAr7AHCAYd6EXragLH5ofmbUUF76Qa
RZoatAUst8Azivez987LWDnHWYFaYMQFEQMdZZrtHOQkXDPa3yG0HSWmaWp1B9cN
uO6OzZwiwCp+p/cztHM7oJ0jaQcQTtboFZATQpCvq/p6GiDrednIxMSMWvKvbfAx
bDsoqGHA7Fm6cn2BHuffyIrHwC+y/22LWPn19GJdy9xEWCJNb9mrtnTx09XGT3tE
8fadQU3PxRkYtIgL7z/B1lJipA5Vwz6cOdMI5a6CWAkeISHcrcxSa6CFZ4doElTk
tSPfHEmY0B0sTSEnKqefkT9pefOYdXHp7cJrABEBAAG0O1RvcnJlbnRTdHJlYW0g
KFRvcnJlbnRTdHJlYW0gcHJvZHVjdHMpIDx0c3ZpZXdlckBnbWFpbC5jb20+iQE4
BBMBAgAiBQJP+BGGAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRBQ4rzw
44Bc2PG1B/kB3EkfJyeuWyun5Veue0/67s74fQX4vVB5p+0g3QwzN6CGnUl6O9MY
P73ijKPLUg31aliuoJIz5yQM9uzV1m6Uv9swQ0YRd2Rb4//YidoX0whIZ/gmVevv
Te3qhEOgYKbh4RWHmPrWIyUsRSuBvRSNNwnNKqiaghyO79TWhymcGHAkI4IFcv8e
Rq5QvlENjAhYuXorZ6NetPJ0MuWymrViuKozcf2BjsJuI9zcj6e3cACr+Ek7A6Av
cTHSRsXGj7S9gdopBpinQHWs/6qmyJjKWheh7zNdyGERMKIcQGEwgOERtFPtjKLg
sjI6qBZ9vzWHGvNrqYg/ql2n1UnNIrAuuQENBE/4EYYBCAC4zz5TxKpmO7d46YRX
UmALTI6IR6atbS+Z1p1XyZLglmwZsnnRdDdMpPVedrtw7DimYbHEMgpdHnWA4P/K
GGIKQgI5squM3mUzfr6Whl7VKRdPgxXSYTmfFxwtjmf7e/qg2ewffFsI+gkt3r5p
4E7wLc4zJbtjBK+LHMz7XdHShuYLhREZ3JL4Bl2Br0TYU5cW/vnxT1GLutyiQYK6
/2am8x6GOtlOBhoRAj7h3g679EErA42YckeH6PXb5LrsltoKmiHbHYrDppo2v/RE
iriEysp1ZLDxgzF7pRpgpKoSY8I2xymx+EiPU612Bqmrxck12AbecgEFqWLykwWM
ehTBABEBAAGJAR8EGAECAAkFAk/4EYYCGwwACgkQUOK88OOAXNiTrAf/a+T777JO
VifNSPTKVumdMCThntjuto7mT445wKPEG61u95D+bhp8sWQuzzIeHgiY1u6RQB/d
o72xcvph+XWFCz+YGtn7tQrsT0hItHYnzbsnH7lgNpMdter8AMAIGNMbbLH+o+Nt
gtAV5SMbodZZCCLQXi5YVKbb6GjvfUX6xLe12sZOlPGBWzpgfMy1AkmpfrG1He3R
HcIT0DU4PHLxs1MAX61hwvlZxH61bm++Ynm0VxyrDqshEQCeoGKxNRbxs82/5yj1
/J0B/lH/ADcP1UMXMrg0Xmmo0jNIrwmThA4feGQEywFdLmmbHFC5fe8ANyfWRZ6U
jEIKEMYG7Ygd0w==
=SEC0
-----END PGP PUBLIC KEY BLOCK-----
100%[======================================>] 1.756       --.-K/s   in 0s      

2014-11-30 14:50:01 (57,4 MB/s) - auf die Standardausgabe geschrieben [1756/1756]

Ho to manually add the key? thanks.

Kaz Wolfe
  • 34,122
  • 21
  • 114
  • 172
phill4
  • 35

4 Answers4

4

You can also do this without the terminal (You've probably already done steps 1-3):

  1. Open the Ubuntu Software center.

  2. Edit - Software sources - Other Software - Add

  3. In the field "APT Line" type deb http://repo.acestream.org/ubuntu/ trusty main

  4. If you're a developer and want the source, uncheck the binaries. If you're a user (most probably) uncheck the "Source Code" one.

  5. Then download the http://repo.acestream.org/keys/acestream.public.key in a location you'll remember for the next step.

  6. Go to the authentication tab and import the key file from the previous step.

Done!

Fabby
  • 34,259
  • Whan it's a ppa, it's even simpler: just add "ppa:user/ppa-name" in step 3 and forget about the other steps... – Fabby Nov 30 '14 at 23:05
  • 1
    Warning! Achtung! Внимание! You're adding a third-party repository to your Ubuntu system and this repository has not been checked and will never be checked by the Ubuntu Security folks (as it's not even on launchpad) so think again if you really need this repository and if you really cannot use qBittorrent or Transmission or any of the othe bittorrent clients out there that are checked for security flaws! – Fabby Nov 30 '14 at 23:12
  • 1
    Don't thank me in writing... >:) Just accept my answer as "valid" and once you have enough reputation, vote it up! ;-) That is better on this site then posting a "Thank you" comment as my reputation will go up and others having the same problem as you will find a valid answer that was voted up! ;-) – Fabby Dec 02 '14 at 22:29
  • 1
    done. ;)........................ – phill4 Dec 03 '14 at 23:36
2

The first sudo is not necessary. The wget command can be run by any user.

The problem lies with the second sudo. It is probably waiting for you to type your password. Unfortunately, there is no prompt printed.

There are three possible solutions:

  1. run the command and then when it does not continue, type your password. It will not show on screen.

  2. first run some other sudo like sudo ls, type the password after the prompt and then try the failed command again. Now the second sudo will not ask for the password and all will be fine.

    $ sudo ls
    $ wget -O- http://repo.acestream.org/keys/acestream.public.key | sudo apt-key add -
    
  3. give yourself root rights sudo su - and run the failed command without sudo

    $ sudo su -
    # wget -O- http://repo.acestream.org/keys/acestream.public.key | apt-key add - 
    
1

answer from Marion Neuenschwander is correct. I am new in here so dunno how to upvote it or else.

I used to install PgAdmin4 in Ubuntu 20.04 and it failed every time when i want to add the PGP key. It always hang out forever.

The problem is actually that sudo apt-add key is not prompted for you to input password when it as a combined command wget|sudo apt-add key for some reason, and the terminal is waiting you to input Sudo password.

So the solution is (Use my PgAdmin4 download as example), just seperate the command, don't use |

  1. Download the key by wget

    wget -o- https://www.pgadmin.org/static/packages_pgadmin_org.pub
    
  2. Add your key with sudo

    sudo apt-key add packages_pgadmin_org.pub
    
  3. Key is imported and you can install what ever you want.

0

Following command with -qO option :

wget -qO - http://repo.acestream.org/keys/acestream.public.key | apt-key add -

That works for me.

damadam
  • 2,833