1

I keep getting this error when running my playbook on Ubuntu 22.04LTS server and have been trying to fix it for sometime now but aren't making progress.

fatal: [MY IP]: FAILED! => {"changed": false, "msg": "Failed to update apt cache: W:Updating from such a repository can't be done securely, and is therefore disabled by default., W:See apt-secure(8) manpage for repository creation and user configuration details., W:GPG error: https://pkg.jenkins.io/debian-stable binary/ Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5BA**********5CA, E:The repository 'https://pkg.jenkins.io/debian-stable binary/ Release' is not signed."}

5
  • How did you import the public gpg key for the repository? Commented May 24, 2023 at 12:46
  • And what does your sources.list for jenkins look like? Commented May 24, 2023 at 12:49
  • I used the commands: curl -fsSL pkg.jenkins.io/debian-stable/jenkins.io.key | sudo tee \ /usr/share/keyrings/jenkins-keyring.asc > /dev/null echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \ pkg.jenkins.io/debian-stable binary/ | sudo tee \ /etc/apt/sources.list.d/jenkins.list > /dev/null Commented May 24, 2023 at 12:56
  • Please edit addition information in the question, it's unreadable in the comments. Commented May 24, 2023 at 13:05
  • And please show what your configuration files look like, don't just copy the commands from the documentation. Commented May 24, 2023 at 13:09

1 Answer 1

0

The PGP key you downloaded is wrong.

The current installation instructions contain this command for the import:

curl -fsSL https://pkg.jenkins.io/debian/jenkins.io-2023.key | sudo tee \ /usr/share/keyrings/jenkins-keyring.asc > /dev/null 

You used an older URL which is missing the -2023 in the key filename.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.