I am trying to download dependencies for go in the Jenkins pipeline as follows
stages {
stage('terraform build') {
steps {
withEnv(["GOPROXY=https://${env.ARTIFACTORY_USER}:${env.ARTIFACTORY_PASSWORD}@.jfrog.io//api/go/goproxy"]) {
sh "go get testing"
sh "go get github.com/gruntwork-io/terratest/modules/terraform"
sh "go get github.com/stretchr/testify/assert"
}
withAWS(role: "arn:aws:iam:::role/-jenkins") {
sh "gradle ${GRADLE_ARGS}"
}
}
}
I see the following error which makes me think it is not able to reach out to github?
20:23:29 unrecognized import path "gopkg.in/yaml.v3": https fetch: Get "https://gopkg.in/yaml.v3?go-get=1": net/http: TLS handshake timeout
Am I using the GOPROXY
in the correct way?
Go version