1

I am new on Linux distribution and I have a problem I did not manage to fix. I tried to update my Debian computer with apt-get update. But at the end, I obtained the following error:

.W: Erreur de GPG : http://repo.mongodb.org jessie/mongodb-org/3.4 Release : Les signatures suivantes ne sont pas valables : KEYEXPIRED 1515625755

I don't know how to fix it. The computer date is correct.

Kara
  • 105
  • 7
balou
  • 11
  • 1
  • 2
  • 2
    Possible duplicate of [APT: Public Key is missing? How to fix?](https://serverfault.com/questions/356986/apt-public-key-is-missing-how-to-fix) – Robert Riedl Jan 18 '18 at 14:49

2 Answers2

2

This works for me with mongo 3.4

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 && sudo apt-get update

make
  • 21
  • 1
1

To fix this, you need to "install" the key again

sudo apt-key adv --keyserver <mongodb repo keyserver> --recv-keys <last 8 digits of key>

Some googling resulted in this

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927

taken from here

Robert Riedl
  • 337
  • 2
  • 11
  • Thank you for your rapid response. I wrote : apt-key adv --keyserver --recv-keys A15703C6 I tried it and I get the following things : bash: mongodb: Aucun fichier ou dossier de ce type ... – balou Jan 18 '18 at 14:56
  • I found [this](https://jira.mongodb.org/browse/SERVER-31459?focusedCommentId=1703071&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-1703071) on an external site. This works for me, I'll update my answer. – Robert Riedl Jan 18 '18 at 15:00
  • When I wrote : apt-key list | grep "expirée", I obtained : pub 4096R/F6D61D45 2015-05-27 [expirée : 2017-05-26] So I tried the 2 above commands with the key digits "F6D61D45"... Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.G3nMFB1M1e --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyring /etc/apt/trusted.gpg.d/chris-lea-redis-server.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-automatic.gpg --keyring /etc/apt/trusted.gpg.d/d [...] Is is normal ? – balou Jan 18 '18 at 15:40
  • Did you try `apt-get update` after that ? – Robert Riedl Jan 18 '18 at 15:44
  • I did and the "W: Erreur de GPG : http://repo.mongodb.org jessie ..." dit not appear anymore ! However, when I checked the validity of the keys (apt-key list | grep "expirée"), I obtained : pub 4096R/F6D61D45 2015-05-27 [expirée : 2017-05-26] So the key is still expired right ? – balou Jan 18 '18 at 15:54
  • @balou, yes, the old key is expired, this added the new key – Robert Riedl Apr 10 '18 at 10:34