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 products 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.

1 2 3 Connecting to releases.hashicorp.com (108.138.85.53:443) wget: note: TLS certificate validation not implemented wget: error getting response: Connection reset by peer

Environment

Bitbucket Cloud Pipelines

Diagnosis

Running the command below on Bitbucket Cloud Pipelines:

1 wget https://releases.hashicorp.com/terraform/1.3.7/terraform_1.3.7_linux_amd64.zip

Results in the following error message below:

1 2 3 Connecting to releases.hashicorp.com (108.138.85.53:443) wget: note: TLS certificate validation not implemented wget: error getting response: Connection reset by peer

Cause

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.

1 2 - apt-get install ca-certificates -y - wget https://releases.hashicorp.com/terraform/1.3.7/terraform_1.3.7_linux_amd64.zip

Updated on April 11, 2025

Still need help?

The Atlassian Community is here for you.