-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
Another issue in the long tradition of HTTP proxies! The fun just never stops. Because cargo does not support private registries, internal packages are stored in our self-hosted internal git host. Since we do use public cargo packages, we still need access to gitlab, which requires a forward proxy. Unfortunately, downloading dependencies from our internal git host requires that there be no forward proxy on the request. This requires the no_proxy
environment variable. This way, external requests can be proxied and internal requests can be sent directly. Cargo does not seem to respect this variable and as a result, our internal dependencies can not be installed. This is a big blow to using rust at my company. The no private registry thing was a tough sell, but if this doesn't work I just don't know if it's feasible.
What did I do:
export http_proxy=http://proxy.corp.com
export HTTP_PROXY="${http_proxy}"
export HTTPS_PROXY="${http_proxy}"
export https_proxy="${http_proxy}"
export no_proxy=git.corp.com
cargo build
What happened:
Updating git repository `https://git.corp.com/tools/logging-helper`
warning: spurious network error (2 tries remaining): failed to receive HTTP 200 response: got 404; class=Net (12)
warning: spurious network error (1 tries remaining): failed to receive HTTP 200 response: got 404; class=Net (12)
error: failed to load source for a dependency on `logging-helper`
Caused by:
Unable to update https://git.corp.com/tools/logging-helper#b0cb6965
Caused by:
failed to clone into: /Users/me/.cargo/git/db/logging-helper-68c9501fefa8f883
Caused by:
failed to receive HTTP 200 response: got 404; class=Net (12)
If I unset all of the proxy variables, then I can download the internal dependencies, but none of the external dependencies.