Getting "TLS certificate validation not implemented" error message while downloading a Terraform file in Bitbucket Cloud Pipelines
Platform Notice: Cloud Only - This article only applies to Atlassian apps on the cloud platform.
Summary
This knowledge base article provides instructions on resolving an issue encountered when attempting to download a Terraform file in Bitbucket Cloud Pipelines using the wget command, which results in the error message displayed below.
Connecting to releases.hashicorp.com (108.138.85.53:443)
wget: note: TLS certificate validation not implemented
wget: error getting response: Connection reset by peerEnvironment
Bitbucket Cloud Pipelines
Diagnosis
Running the command below on Bitbucket Cloud Pipelines:
wget https://releases.hashicorp.com/terraform/1.3.7/terraform_1.3.7_linux_amd64.zipResults in the following error message below:
Connecting to releases.hashicorp.com (108.138.85.53:443)
wget: note: TLS certificate validation not implemented
wget: error getting response: Connection reset by peerCause
The certificate currently in use for releases.hashicorp.com, which is utilized by the Docker image in your Bitbucket Cloud Pipelines, appears to be either expired or lacking necessary certificates within its chain.
Solution
Before running the wget command, you'll need to install ca-certificates first.
- apt-get install ca-certificates -y
- wget https://releases.hashicorp.com/terraform/1.3.7/terraform_1.3.7_linux_amd64.zipWas this helpful?