-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Cargo does not respect no_proxy environment variable #6114
Comments
Thanks for the report! This should be fixed in #6115 |
Apparently if we don't do it then our configuration otherwise means it won't automatically get picked up! Closes rust-lang#6114
Thanks for the quick turnaround on this! |
Ok we have quite a long discussion in this thread where we've discovered a few things:
I've reproduced locally using a repo on gitlab. Adding some more debug logging and poking around with In any case what I've found is:
When libgit2 processes redirects it'll reset the path we're sending redirects to based on the redirected response. The So all in all, it looks like the OP of this issue and current title are red herrings. The actual bug here is that The fix is to around here use the Alternative fixes are:
|
Thank you very much for your patience and understanding. I do apologize for the red-herring issue, and the sidetracking of the pr comment section. Glad we were able to nail the real problem down. |
No worries! Was a fun bug to hunt down and actually get to the bottom of, thanks for being so responsive testing out changes! @ehuss says he's interested in investigating fixing this as well! |
If you use a gitlab url such as "https://gitlab.com/user/repo", then gitlab will redirect the first GET request to "https://gitlab.com/user/repo.git" (with the `.git` at the end). However, gitlab does not redirect the next POST, causing a 404. This change keeps track of the original redirect so that subsequent actions use the new base url. This roughly mirrors what is done in libgit2's transport. Fixes rust-lang/cargo#6114
If you use a gitlab url such as "https://gitlab.com/user/repo", then gitlab will redirect the first GET request to "https://gitlab.com/user/repo.git" (with the `.git` at the end). However, gitlab does not redirect the next POST, causing a 404. This change keeps track of the original redirect so that subsequent actions use the new base url. This roughly mirrors what is done in libgit2's transport. Fixes rust-lang/cargo#6114
Ok |
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:
What happened:
If I unset all of the proxy variables, then I can download the internal dependencies, but none of the external dependencies.
The text was updated successfully, but these errors were encountered: