Adding ca certificates to support transparent proxy
Hello, is it possible to add a CA certificate to be used during func build steps? I’m working with a transparent proxy and builds using buildpacks fail when downloading versions of Python, go, etc. in the container. This seems to be possible with with the build pack “pack” command using bindings but I wasn’t sure if this was exposed in func. Thanks!
This is not supported in func, see: https://github.com/knative/func/issues/2177
@d-m try putting your CAs in your project directory and stetting the SSL_CERT_DIR envvar.
build:
buildEnvs:
- name: SSL_CERT_DIR
value: /workspace
It should work: https://cloud-native.slack.com/archives/C04LKEZUXEE/p1707837008531269 .
@d-m try putting your CAs in your project directory and stetting the
SSL_CERT_DIRenvvar.build: buildEnvs: - name: SSL_CERT_DIR value: /workspace
What should be value for SSL_CERT_DIR in windows and linux? Is this common for all environments?
@Vishal1297 it should be just /workspace -- that's the path of source code in a build container.
@matejvasek Thanks, It worked but now I am facing another issue. Error is there while downloading go modules from private repo.
Server certification verification failed
Maybe my certs having correct?
@matejvasek Thanks, It worked but now I am facing another issue. Error is there while downloading go modules from private repo.
Server certification verification failed
Maybe my certs having correct?
It's resolved with help of go mod vendor
@matejvasek Thanks, It worked but now I am facing another issue. Error is there while downloading go modules from private repo.
Server certification verification failed
Maybe my certs having correct?
Hard to tell without more output. Maybe go does not respect SSL_CERT_DIR, I do not know.
@matejvasek Thanks, It worked but now I am facing another issue. Error is there while downloading go modules from private repo. Server certification verification failed Maybe my certs having correct?
Hard to tell without more output. Maybe
godoes not respectSSL_CERT_DIR, I do not know.
SSL_CERT_DIR env works with https://github.com/paketo-buildpacks/go
What I got to know is that we have two options to solve the certificate problem.
- paketo-buildpacks/go-mod-vendor
- Git bindings
What are "Git bindings"?
What are "Git bindings"?
https://github.com/paketo-buildpacks/go-mod-vendor/issues/140
I mean bindings for git paketo.io/docs/howto/configuration/#bindings. Not sure how to use it.
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.
See @matejvasek solution above, which should work in most cases for the question from the OP:
@d-m try putting your CAs in your project directory and stetting the SSL_CERT_DIR envvar.
build:
buildEnvs:
- name: SSL_CERT_DIR
value: /workspace