Skip to content

Using --tls_client_certificate for http_archive downloads #19560

Answered by jherland
mrkkrp asked this question in Q&A
Discussion options

You must be logged in to vote

It is possible to make this work by configuring the underlying JVM with a custom keystore containing your certificate + key. Follow the instructions on https://blog.kunicki.org/blog/2015/09/10/ssl-client-certificates-on-the-jvm/, in particular use a command like openssl pkcs12 -export -out keystore.p12 -in client.crt -inkey client.key to create a password-protected keystore file in the PKCS#12 format, and then add something like this to a suitable .bazelrc:

startup --host_jvm_args=-Djavax.net.ssl.keyStore=keystore.p12 \
        --host_jvm_args=-Djavax.net.ssl.keyStoreType=pkcs12 \
        --host_jvm_args=-Djavax.net.ssl.keyStorePassword=<password>

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mrkkrp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants