riezebosch / vsts-tasks-packer

MIT License
15 stars 7 forks source link

Certificate has expired #22

Closed jlangford9284 closed 2 years ago

jlangford9284 commented 2 years ago

When trying to use the packertool in azure devops no matter what version we are faced with

Starting: Install Packer 1.8.0

Task : Packer Tool Installer Description : Finds or Downloads and caches specified version spec of Packer and adds it to the PATH. Version : 0.146.1876 Author : Manuel Riezebosch Help : More information

Downloading: https://releases.hashicorp.com/packer/1.8.0/packer_1.8.0_windows_amd64.zip

[error]certificate has expired

Finishing: Install Packer 1.8.0

SandyB29 commented 2 years ago

We have also started facing the same issue in our ADO pipelines.

FiggyRoll commented 2 years ago

Same issue started for us last night as well, the following work around works for us for now as packer is already installed on our self-hosted agents.

task: PackerTool@0 displayName: Use Packer Latest continueOnError: true

Just add the continueOnError line.

Is this more likely to be a devops issue rather than an issue specifically with this extension? or perhaps with one of the libraries the extension uses? Googling similar issues seems to suggest some expired cert being called by one of the other libraries.

@riezebosch I would love to assist or provide some useful assistance, unfortunately I am not a dev and have 0 clue where to begin in troubleshooting.

Thanks

riezebosch commented 2 years ago

I'm afraid it is the download url at hashicorp where the certificate is expired

FiggyRoll commented 2 years ago

Is it?, if you check the URL without the filename then the cert is valid, ie.

https://releases.hashicorp.com/packer/1.8.0/

curl'ing both show the cert to be valid as well

curl https://releases.hashicorp.com/packer/1.8.0/packer_1.8.0_linux_amd64.zip -vI
curl https://releases.hashicorp.com/packer/1.8.0 -vI
paulgdunnAVEVA commented 2 years ago

This started failing for us as well. How can we get this resolved? Seems like the issue resides on the releases.hashicorp.com site.

attached shows that you can emulate the issue in Chrome. File gets downloaded, but connection is showing "not secure"

releases hashicorp com Not Secure .

paulgdunnAVEVA commented 2 years ago

I also submitted the issue through the Hashicorp.com website.

releases hashicorp com Not Secure_2

jlangford9284 commented 2 years ago

figgyroll can confirm this is working for us as a work around

riezebosch commented 2 years ago

Is it resolved? Looks like working:

Starting: Use Packer 
==============================================================================
Task         : Packer Tool Installer
Description  : Finds or Downloads and caches specified version spec of Packer and adds it to the PATH.
Version      : 0.146.1876
Author       : Manuel Riezebosch
Help         : [More information](https://packer.io/)
==============================================================================
Downloading: https://releases.hashicorp.com/packer/1.8.0/packer_1.8.0_linux_amd64.zip
Extracting archive
/usr/bin/unzip /home/vsts/work/_temp/02ca147b-8ec3-4eb9-9839-0e50091b41b4
Archive:  /home/vsts/work/_temp/02ca147b-8ec3-4eb9-9839-0e50091b41b4
  inflating: packer                  

Caching tool: packer 1.8.0 x64
Prepending PATH environment variable with directory: /opt/hostedtoolcache/packer/1.8.0/x64
Finishing: Use Packer
FiggyRoll commented 2 years ago

Its working for us now.