Skip to content
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

Conflict between git proxy configuration and https_proxy environment variable #1603

Closed
mlvtito opened this issue Mar 11, 2016 · 3 comments
Closed

Comments

@mlvtito
Copy link

mlvtito commented Mar 11, 2016

Hello,

I'm using a proxy on my workstation.

To use Unix tools like "curl" or "wget", I've set "https_proxy" environment variable.
export https_proxy=https://192.168.7.10:8118/

To use the git command, I changed my ".gitconfig" file :
[https] proxy = https://192.168.7.10:8118

When I tried to 'jspm install' with this configuration, JSPM failed to download dependencies from github.

As a workaround, I manually unset 'https_proxy' variable. It is acceptable when I use the command manually but my tooling is facing the same problem.

I'm using JSPM 0.16.31.

Is there anyway to detect this configuration conflict ?

Thanks for all the work done on jspm

@guybedford
Copy link
Member

Since your fix was to unset the https_proxy environment variable, are you saying you don't want jspm to be using your proxy configuration?

@mlvtito
Copy link
Author

mlvtito commented Mar 11, 2016

Thanks for the really fast response.

In fact, I was thinking of a deterministic behavior by prioritizing the configuration settings. For instance, something like this :

if git proxy is configured
then
  do not use environment variable
else
  use environment variable

But this is just an idea, I don't know the internal complexity of JSPM. The fact is just that with this proxy settings, JSPM does not work out of the box.

@guybedford
Copy link
Member

The more branches in the behaviour the more complicated it is for someone new to the project to understand what is going on. So keeping (default) branching behaviour like the suggestion to an absolute minimum is a big development concern with the API.

What we do currently is use whatever local git settings are enabled mainly due to the technical constraint that we simply call out to git execution (pending jspm/github#25 which hasn't been able to make any progress unfortunately).

Ideally we would use the environment variable followed by local configurations in a consistent way so there wasn't this split between git and the http requests made in Node.

Since we don't have that option of discovering what git proxy is enabled, I'd suggest perhaps a global https_proxy option that takes preference over the environment variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants