Skip to content

Setting to get cargo proxy info from git? #8327

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

Closed
gilescope opened this issue Jun 4, 2020 · 2 comments
Closed

Setting to get cargo proxy info from git? #8327

gilescope opened this issue Jun 4, 2020 · 2 comments
Labels
A-git Area: anything dealing with git C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage.

Comments

@gilescope
Copy link
Contributor

cargo depends on a working git (in most cases).
git only works if the proxies are set up correctly.

Would people like / object to a cargo setting that says read git's proxy settings and use them?

Why: In a corporate env with various different proxy setups you would have a .cargo/config that would be portable between them.

At the moment it all feels not as simple as it could be to get everything up and running...
For users they typically have to set up HTTP_PROXY, .cargo/config's proxy settings and git's proxy settings before they're up and running. It would be great if we could tell cargo to just piggy back off git's proxy settings (which it depends on anyway).

Keen to hear people's thoughts.

@gilescope gilescope added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Jun 4, 2020
@ehuss ehuss added the A-git Area: anything dealing with git label Jun 4, 2020
@ehuss
Copy link
Contributor

ehuss commented Jun 4, 2020

Cargo should honor the http_proxy environment setting for all network operations. I don't think Cargo would want to look at the git configuration for non-git operations, that seems like it could be confusing. Perhaps I'm misunderstanding what you are asking?

It does appear that Cargo ignores git's configuration, though. It may be as simple as setting ProxyOptions::auto, though it may be tricky to coordinate with Cargo's own proxy handling. However, even if Cargo did honor that, the user would still need to configure proxy settings for non-git operations.

@epage epage added the S-triage Status: This issue is waiting on initial triage. label Nov 20, 2024
@ehuss
Copy link
Contributor

ehuss commented Mar 4, 2025

I'm going to close as I believe this was implemented in #8986 (Rust 1.51). However, we are discussing different options in #14952.

@ehuss ehuss closed this as completed Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-git Area: anything dealing with git C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage.
Projects
None yet
Development

No branches or pull requests

3 participants