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

error checking │ signature: openpgp: key expired #150

Closed
marcispauls opened this issue Oct 4, 2023 · 15 comments
Closed

error checking │ signature: openpgp: key expired #150

marcispauls opened this issue Oct 4, 2023 · 15 comments
Labels
bug Something isn't working

Comments

@marcispauls
Copy link

Describe the bug
When i try to use provider i got:

image

Additional context

  • ubuntu 22.04 runner
  • hashicorp/setup-terraform@v2
@marcispauls marcispauls added the bug Something isn't working label Oct 4, 2023
@tomasbasham
Copy link
Member

tomasbasham commented Oct 4, 2023

Hi @marcispauls. Thanks for reporting this. This appears to only be an issue with the latest version of the terraform CLI (1.6.0). Can you confirm that the provider works with older versions of the toolchain?

@lra
Copy link

lra commented Oct 4, 2023

Yes, same issue for us, works with 1.5.x, does not work with 1.6.0.

Initializing the backend...

Initializing provider plugins...
- Finding statuscakedev/statuscake versions matching "~> 2.0"...
- Installing statuscakedev/statuscake v2.2.0...
╷
│ Error: Failed to install provider
│ 
│ Error while installing statuscakedev/statuscake v2.2.0: error checking signature: openpgp: key expired
╵

@marcispauls
Copy link
Author

marcispauls commented Oct 4, 2023

yes, checked with 1.5.x works, but its huge challange to downgrade from latest 1.6

@nimboya
Copy link

nimboya commented Oct 5, 2023

I am experiencing the same issue.
image

@Zeneixe
Copy link

Zeneixe commented Oct 5, 2023

Same error here

Partner and community providers are signed by their developers.
If you'd like to know more about provider signing, you can read about it here:
https://www.terraform.io/docs/cli/plugins/signing.html
╷
│ Error: Failed to install provider
│ 
│ Error while installing statuscakedev/statuscake v2.2.0: error checking signature: openpgp: key expired

@sharondescalo
Copy link

same error in terraform version 1.5.X using Atlantis.

@nimboya
Copy link

nimboya commented Oct 5, 2023

@sharondescalo, It actually failed with I used 1.5.x too. But I fixed mine by downgrading to 1.4.4 that is what fixed it.

If you are using the Github Action. You can specify the version like this

steps:
- uses: hashicorp/setup-terraform@v2
  with:
    terraform_version: 1.4.4
    cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}

@tomasbasham
Copy link
Member

That is interesting @sharondescalo. We're not able to reproduce this issue on the 1.5.x branch of the CLI - not using GitHub Actions.

$ ./terraform -version
Terraform v1.5.7
on linux_amd64
+ provider registry.terraform.io/statuscakedev/statuscake v2.2.0

Your version of Terraform is out of date! The latest version
is 1.6.0. You can update by downloading from https://www.terraform.io/downloads.html

$ ./terraform init

Initializing the backend...

Initializing provider plugins...
- Finding statuscakedev/statuscake versions matching "~> 2.2.0"...
- Installing statuscakedev/statuscake v2.2.0...
- Installed statuscakedev/statuscake v2.2.0 (signed by a HashiCorp partner, key ID 4E916C2959C4EAA9)

Partner and community providers are signed by their developers.
If you'd like to know more about provider signing, you can read about it here:
https://www.terraform.io/docs/cli/plugins/signing.html

Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run "terraform init" in the future.

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

whereas using the latest version 1.6 we can reproduce the error

$ ./terraform -version
Terraform v1.6.0
on linux_amd64
+ provider registry.terraform.io/statuscakedev/statuscake v2.2.0

$ ./terraform init

Initializing the backend...

Initializing provider plugins...
- Finding statuscakedev/statuscake versions matching "~> 2.2.0"...
- Installing statuscakedev/statuscake v2.2.0...
╷
│ Error: Failed to install provider
│
│ Error while installing statuscakedev/statuscake v2.2.0: error checking signature: openpgp: key expired
╵

We've filed an issue with HasiCorp. Hopefully they have some more insight. As far as we are to believe the provider should not have broke between Terraform versions.

@tomasbasham
Copy link
Member

That looks to be a different issue. There is no version 2.20.0. I think you may want 2.2.0

@sharondescalo
Copy link

sharondescalo commented Oct 5, 2023

@tomasbasham Sorry, it was typo. I used runatlantis/atlantis:v0.25.0 with a deployment ENV ATLANTIS_TERRAFORM_VERSION=1.4.6 and ATLANTIS_TERRAFORM_VERSION=1.5.5:
image

@sharondescalo
Copy link

issue fixed with terraform$ATLANTIS_TERRAFORM_VERSION init -reconfigure

@lra
Copy link

lra commented Oct 5, 2023

Just to be clear for newcomers, the issue is not fixed:

  • It works with terraform < 1.6.0
  • It does not work with terraform 1.6.0

@tomasbasham
Copy link
Member

tomasbasham commented Oct 6, 2023

Version 2.2.1 of the provider has been released using a different signing key. From what I can tell Terraform 1.6 is working with this new version, as is the latest version in the 1.5.x branch.

@tomasbasham
Copy link
Member

Thanks for the link btw @Zeneixe. It was really helpful

@lra
Copy link

lra commented Oct 6, 2023

Fix confirmed for us, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

6 participants