grafana / xk6

Build k6 with extensions
Apache License 2.0
215 stars 20 forks source link

Cannot build: failed to verify certificate #95

Closed six8 closed 6 months ago

six8 commented 6 months ago

When running the documented command:

docker run --rm -it -u "$(id -u):$(id -g)" -v "${PWD}:/xk6" grafana/xk6 build v0.43.1 \
  --with github.com/mostafa/xk6-kafka@v0.17.0 \
  --with github.com/grafana/xk6-output-influxdb@v0.3.0

It fails because of SSL validation.

2024/05/06 17:31:07 [INFO] Temporary folder: /tmp/buildenv_2024-05-06-1731.563602991
2024/05/06 17:31:07 [INFO] Initializing Go module
2024/05/06 17:31:07 [INFO] exec (timeout=10s): /usr/local/go/bin/go mod init k6 
go: creating new go.mod: module k6
2024/05/06 17:31:07 [INFO] Pinning versions
2024/05/06 17:31:07 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod edit -require github.com/mostafa/xk6-kafka@v0.17.0 
2024/05/06 17:31:07 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod tidy -compat=1.17 
go: downloading github.com/mostafa/xk6-kafka v0.17.0
go: k6 imports
    github.com/mostafa/xk6-kafka: github.com/mostafa/xk6-kafka@v0.17.0: verifying module: github.com/mostafa/xk6-kafka@v0.17.0: Get "https://sum.golang.org/lookup/github.com/mostafa/xk6-kafka@v0.17.0": tls: failed to verify certificate: x509: certificate signed by unknown authority
2024/05/06 17:31:08 [INFO] Cleaning up temporary folder: /tmp/buildenv_2024-05-06-1731.563602991
2024/05/06 17:31:08 [FATAL] exit status 1

It appears the images CA certificates are out of date.

six8 commented 6 months ago

False alarm. Cisco Umbrella is being a man in the middle https://stackoverflow.com/a/68333945/185316