Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid signature from cli.github.com #739

Closed
drodil opened this issue Sep 6, 2024 · 9 comments
Closed

Invalid signature from cli.github.com #739

drodil opened this issue Sep 6, 2024 · 9 comments

Comments

@drodil
Copy link

drodil commented Sep 6, 2024

Describe the bug

Cannot run apt update in the build image.

Reading package lists...
--
81 | W: GPG error: https://cli.github.com/packages stable InRelease: The following signatures were invalid: EXPKEYSIG 23F3D4EA75716059 GitHub CLI <[email protected]>
82 | E: The repository 'https://cli.github.com/packages stable InRelease' is not signed.

To Reproduce
Steps to reproduce the behavior:

  1. Run sudo apt-get update in start of the build

Expected behavior
sudo apt-get update works

Platform (please complete the following information):

  • aws/codebuild/standard:7.0

Additional context
The keys were updated because of expiration, see cli/cli#9569

@williammartin
Copy link

Hi folks, many apologies for the troubles from the GitHub CLI.

Glancing around this repo I believe that the important layer that needs to be rebuilt is:

&& wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \

Any layer on top of this that does apt update should begin working again.

For anyone building their images from the ones here, the workaround is probably to add the following to your dockerfiles before running apt update:

RUN mkdir -p -m 755 /etc/apt/keyrings \
    && wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
    && chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
    && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null

Or possibly trimmed down as:

RUN wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
    && chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg

This will grab the new keyring.

@drodil
Copy link
Author

drodil commented Sep 6, 2024

Thanks a lot for this @williammartin 👍 I think this affects many CodeBuild users, so I hope it also gets some eyes from the AWS side!

@williammartin
Copy link

If the workaround above works for you, it would be great if you could drop a note back here for others and for us to know, since we'll be trying to proactively reach out on issues for to support. 🙏

@drodil
Copy link
Author

drodil commented Sep 6, 2024

@williammartin I can confirm that adding wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null && chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg before the update fixes the issue for now.

However, it still should be fixed to the original image.

@toplac
Copy link

toplac commented Sep 6, 2024

Another quick and dirty workaround is to remove the repository before running apt-get update or similar
This works for us because we don't use the gh binary

rm /etc/apt/sources.list.d/github-cli.list

@williammartin
Copy link

However, it still should be fixed to the original image.

Hopefully the AWS folks will come bail out our embarrassment soon 😅

Thanks for the confirmation! I'll probably update the linked issue with a Docker specific section shortly.

@Dylan-AWS
Copy link
Contributor

Dylan-AWS commented Sep 6, 2024

CodeBuild team is working on releasing a new image to resolve this issue

@Dylan-AWS
Copy link
Contributor

CodeBuild has deployed a patch to our images to update the keyring. You will no longer see this error. Resolving this issue.

@ritog
Copy link

ritog commented Sep 19, 2024

cli/cli#9569

This page actually worked for me.

The "What do you need to do about it?" section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants