Skip to content

Instantly share code, notes, and snippets.

@mattdkerr
Created July 17, 2023 20:41
Show Gist options
  • Save mattdkerr/bd0246e06b86d27b577611984567d140 to your computer and use it in GitHub Desktop.
Save mattdkerr/bd0246e06b86d27b577611984567d140 to your computer and use it in GitHub Desktop.
.cargo/config for corp or vpn
[http]
cainfo = "<ca-bundle>"
check-revoke = false
[net]
git-fetch-with-cli = true
@mattdkerr
Copy link
Author

mattdkerr commented Jul 17, 2023

w CA bundle file (PEM/CRT) -- IE ".pem" or such -- contact your IT group for it or export from your system's CA store

note: check revoke is disabled because a private internal root CA is self-signed

@mattdkerr
Copy link
Author

mattdkerr commented Jul 17, 2023

configure git on windows to use external OpenSSL, SChannel, and native certificate credential manager, to fix cargo install --git=<repo>

@mattdkerr
Copy link
Author

if you need to reformat the ca bundle
https://www.reddit.com/r/rust/comments/7yx6q2/cargo_behind_a_corporate_mitm_proxy/
https://stackoverflow.com/questions/4691699/how-to-convert-crt-to-pem
winget install ShiningLight.OpenSSL
openssl x509 -inform DER -outform PEM -in <company>.crt -out <company>.pem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment