If your environment has failed due to an issue with the yarn package, similar to below, it means there's an issue with the package's GPG signature.
GPG error: https://dl.yarnpkg.com/debian stable InRelease: The following signatures
were invalid: EXPKEYSIG 23E7166788B63E1E Yarn Packaging <yarn@dan.cx>
This can be resolved by adding following to the top of your environment's Dockerfile to refresh the package key:
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
Alternatives - which can happen depending on your specific version or date:
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
Or if you do not have any success with apt-key (it is becoming deprecated) the use this:
ENV YARNKEY=yarn-keyring.gpg
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo gpg --dearmour -o /usr/share/keyrings/$YARNKEY && \
echo "deb [signed-by=/usr/share/keyrings/$YARNKEY] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
These are 'best effort' suggestions and have been verified to work in a standard environment.
If you're seeing a similar error but for an nvidia key, please check out this article: Build error for nvidia GPG key
Comments
0 comments
Please sign in to leave a comment.