"Failed to decrypt field" after upgrading to Renovate >= 37.317.0 #28934
Unanswered
9numbernine9
asked this question in
Request Help
Replies: 1 comment 10 replies
-
|
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What would you like help with?
I think I found a bug
How are you running Renovate?
Self-hosted
If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate.
Bitbucket Cloud; Renovate >= 37.317.0
Please tell us more about your question or problem
Hello!
Since upgrading our self-hosted Renovate to versions >=
37.317.0
, we've started noticing a difference in behaviour with respect to encryption/decryption with GPG keys. (We've tested with37.342.2
,37.340.9
, and37.328.1
). Previously the GPG keys that we were using worked perfectly fine, but after the37.317.0
release they stopped working correctly; in our logs we would see"Failed to decrypt field password. Please re-encrypt and try again."
errors, despite the keys working correctly previously.Poking through the release notes for
37.317.0
, we noticed that the PGP library was replaced with Renovate's fork ofkbpgp
. This release also added theRENOVATE_X_USE_OPENPGP
flag, which we enabled for testing purposes and our encryption/decryption worked correctly once again. Knowing that this is an experimental flag, however, this doesn't seem like a permanent solution.What we've observed is that
kbpgp
seems to treat keys that are generated with a version of GnuPG that's too new as being invalid. We tested this by generating a brand new RSA 4096-bit keypair using GnuPG2.4.5
, re-encrypting all of our secrets with this new key, disabling theRENOVATE_X_USE_OPENPGP
flag, and trying again - same decryption error as before. Then, we went through the same process but we used thegpg
executable inside of therenovatebot/renovate:37.342.2
image instead - which uses GnuPG2.2.17
- re-encrypting all of our secrets again with these new keys, and everything worked fine withkbpgp
decryption.With all of that said, my questions are:
My concern is that anyone who's using a newer GnuPG might run into this issue, and with the recent release of Ubuntu 24.04 - which defaults to GnuPG
2.4.x
- the chances of someone running into this situation are higher.Logs (if relevant)
Logs
Beta Was this translation helpful? Give feedback.
All reactions