Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build attempt behind firewall #2297

Closed
gpettey-ercot opened this issue Feb 20, 2025 · 2 comments
Closed

build attempt behind firewall #2297

gpettey-ercot opened this issue Feb 20, 2025 · 2 comments

Comments

@gpettey-ercot
Copy link

I am attempting to build yq behind a firewall that intercepts SSL/TLS. I have customized Dockerfile.dev a bit, adding the replacement SSL/TLS certificates to the OpenSSL system trust store, and verified they are trusted, but the step that runs the container fails. I'm guessing "go mod" is not respecting the openssl settings of the system. How do I change that?

[2/2] STEP 4/8: COPY scripts/devtools.sh /opt/devtools.sh
--> 421047e6a97b
[2/2] STEP 5/8: RUN set -e -x &&     /opt/devtools.sh
+ /opt/devtools.sh
+ go mod download golang.org/x/tools@latest
go: module golang.org/x/tools: Get "https://proxy.golang.org/golang.org/x/tools/@v/list": tls: failed to verify certificate: x509: certificate signed by unknown authority
Error: building at STEP "RUN set -e -x &&     /opt/devtools.sh": while running runtime: exit status 1
make: *** [Makefile:47: tmp/dev_image_id] Error 1
@gpettey-ercot
Copy link
Author

gpettey-ercot commented Feb 26, 2025

Added both openssl s_client and curl commands to proxy.golang.org (https and port 443) to Dockerfile.dev; both are succesful and treat the interception certificate as valid. Only go mod download is effed.

Tried adding ENV SSL_CERT_DIR=/etc/ssl/certs/ and ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt, and both of them, but none of the three changed the go mod download failure.

@gpettey-ercot
Copy link
Author

PEBKAC. Certificates included "TRUSTED" in the PEM header and go mod apparently did not like that.

@gpettey-ercot gpettey-ercot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant