0

我正在尝试在Jenkins管道中下载依赖项,如下所示

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}"
              }

          }
        }

我看到以下错误,这让我认为它无法访问 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

我是否GOPROXY以正确的方式使用?

去版

4

0 回答 0