skip to Main Content

I have a build process that install cf-cli using package manager (https://docs.cloudfoundry.org/cf-cli/install-go-cli.html#pkg) and it worked until recently failing with an error:

curl -fLsS https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | gpg --dearmor -o cli.cloudfoundry.org.gpg
sudo install -D -o root -g root -m 644 cli.cloudfoundry.org.gpg /etc/apt/keyrings/cli.cloudfoundry.org.gpg
echo "deb [signed-by=/etc/apt/keyrings/cli.cloudfoundry.org.gpg] https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list
sudo sh -c "apt-get update && apt-get -y install cf8-cli"

apt-get update fails:

The following signatures were invalid: EXPKEYSIG 172B5989FCD21EF8 CF CLI Team <[email protected]>

Reading package lists...
W: GPG error: https://cf-cli-debian-repo.s3.amazonaws.com stable InRelease: The following signatures were invalid: EXPKEYSIG 172B5989FCD21EF8 CF CLI Team <[email protected]>
E: The repository 'https://packages.cloudfoundry.org/debian stable InRelease' is not signed.

It seems like the key has expired.

2

Answers


  1. wget -O cf-cli.deb "https://packages.cloudfoundry.org/stable?release=debian64&source=github&quot;

    sudo dpkg -i cf-cli.deb

    sudo apt-get install -f

    I was able to install cf-cli this way.

    Login or Signup to reply.
  2. I was having the same issue and I fixed it by adding [trusted=yes]
    Why we face this issue:
    The Cloud Foundry repository was using an expired GPG key, causing apt to reject the repository because it could not verify the authenticity of the packages. This led to errors during the Docker build process.

    Solution:
    To bypass the GPG key verification process, the command was updated with the following changes:

    echo "deb [trusted=yes] https://packages.cloudfoundry.org/debian stable main" | tee /etc/apt/sources.list.d/cloudfoundry-cli.list
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search