-
-
Notifications
You must be signed in to change notification settings - Fork 274
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
jspm install fails behind proxy #10
Comments
"jquery" isn't a Github repo. Try Even better, simply use |
|
I've added an |
Nope.
|
Ok, I've included a fix for this. Try again. |
Now I get:
My hunch is that it is not respecting On a related note, npm doesn't respect *_proxy environment variables either: I have to set |
Ahh, yes this is because github is downloaded with the command:
If you run that command directly in the terminal does it work? |
Yup. If I have |
What does this environment variable actually do? Should it be set directly in Node? For example: child_process.exec('git clone --mirror https://github.com/components/jquery.git', {
env: {
https_proxy: process.env.https_proxy
}
}); Or even: child_process.exec('git clone --mirror https://github.com/components/jquery.git', {
env: process.env
}); I don't have an understanding of the https_proxy thing, so would be good to know. |
Commands like wget, curl, and git check for Looks to me that it's not
That narrows the error to https://github.com/jspm/jspm/blob/master/jspm.js#L301 This post explains how to use Node's I will try to work out a patch later in the evening. |
Thanks, that sounds like you've worked it out then. If you can post a patch that would be great! |
The problem isn't resolved yet. In reference to the commit attached above: From behind an http proxy, whether I make a request to https endpoint or http, I must use
|
The proxy needs to use http, even for https (see http://stackoverflow.com/questions/3862813/how-can-i-use-an-http-proxy-with-node-js-http-client/5810547#6366629). This way, we don't need Basically, have var path = '/jspm/registry@master/package-overrides/' + fullName.replace(':', '/') + '.json';
(function(handler) {
if (process.env.https_proxy)
http.get({
host: process.env.https_proxy,
path: 'https://github.jspm.io' + path
}, handler);
else
https.get({
host: 'https://github.jspm.io',
path: path,
rejectUnauthorized: false
}, handler);
})(function(res) {
// .. as before
}); I'd really appreciate if you can still try out the pull request as I am unable to test any proxy from my side. |
Hey. Thanks for that snippet. I didn't think of using I am aware that I need to use I will try again after next Tuesday (I am going home now) and get back to you on require-less stuff too then. Thanks again. |
Hey. I moved out of college in the last month and I have been working without pesky proxies since then. I am sorry, it won't be possible for me to work on this pull request now. |
Thanks for letting me know - no problem at all. |
It looks like this may not yet be resolved. What is the current status? When I connect through corporate firewall:
Note the above happens whether I use
My jspm config includes username/password for github:
I've configured
My
Lastly, proxy environment variables are configured in the shell:
As far as I can tell, the issue is a problem with JSPM. It is a blocker at the moment, and I'd be happy to work on resolving the problem. But I'd like to know more details about the current status of this issue. I would also appreciate guidance on what might be wrong and where to find it in the code. |
Yes - the https flag isn't wired through as an argument to the endpoint. This wiring seems to have been lost somehow, but should be fairly simple to get back. |
Github recommends using https because it will work everywhere including behind firewalls. I would suggest that https be the default in JSPM and let users override it to use ssh. What do you think? Are you going to fix the wiring that got lost? Or should I look into it? Do you have any pointers on where to look? |
So... after some debugging, it looks like at least part of the problem may be the use of I have shell commands to turn on and off command-line proxy support depending on if I'm in the office or not. It is critical that toggling proxy support works with JSPM as well. One option is to utilize the Another option is to make it easily configurable via command line commands such as
This would allow proxy support to be turned on and off by running a shell script. There would need to be a way to remove the proxy setting, such as setting a property without a value: Request can be configured to use a proxy for all commands:
Or it can be done on a per request basis:
I really need to get this solved so I can use JSPM and would be happy to help. I'd like to coordinate so I don't work on something that someone else is already fixing. And I'd like pointers to places in the codebase that might need to be changed. |
Yes comprehensive proxy support is definitely a priority. This affects:
If you do work on this, a PR would be very welcome. The soonest I will be able to look at it would be later this weekend myself. |
I like the idea of Then |
Nothing would beat the convenience of jspm automatically picking up proxy setting from |
Right so if we just supported the environment variable would that be enough here? Or do you think the environment variable and a proxy config option? |
I was just making a case to not ignore If I have to choose one? env variable. It would be sufficient most of the times. But there must be a reason that git, curl, wget and all support both. |
I've started working on adding proxy support to The reason I am suggesting to use I too am recommending that environment variables be honored by default and that We will need to at least pass the proxy information to custom endpoints so they can handle it themselves. But it would be really great if we could expose some sort of request object to the endpoints that natively supports proxying so that endpoint developers have less work to do. It could simply be passed in the options, but that doesn't seem very clean. Maybe a cleaner approach is to not expose the request object, but a helper that can manipulate requestOptions. Any other ideas? |
This all sounds great. I'd be happiest with the dependency on I think it's fine to give the endpoints a I completely agree with using environment variables with |
@guybedford wrote:
Env variable But I am wondering if jspm really needs to support |
I've had no proxy problems with jspm since the On Thu, Jan 29, 2015, 1:17 AM Guy Bedford notifications@github.com wrote:
|
@guybedford the furthest I got with debugging this was: https://github.com/jspm/jspm-cli/blob/master/lib/package.js#L456. Where is |
@tauren |
@faceleg that could well be it. Does it fail on the lookup or download stage? jspm github uses |
@faceleg perhaps log the exec command as well and see if you can run that from the command line ok. |
@guybedford fails on the download stage - the exec command works in jspm and on my CLI |
@faceleg thanks for letting me know. The next three things to check are:
|
Updating |
Waiiiitaminute, I see the GH module hasa 2.51 listed at https://github.com/jspm/github/blob/master/package.json#L22 but wasn't in mine, investigating. |
The |
@faceleg nice!! The request update is in the master branch, not yet released - release should be out tomorrow with some luck. |
Cool. I guess re-close this then |
I have the same problem with my company proxy on Windows 7 :
Same error for a NPM dependency. However, I don't have this issue with the "npm install" command. Here is what I try :
Can you explain what is this error message and how can I solve this ? Thanks in advance |
One thing to note is that Also ensure you have locally configured Apart from that I must admit I don't have much of a clue when it comes to proxies. Perhaps someone else here with more experience can help. |
I got the same error with |
@guybedford it is the same on the Win7 machines with io.js 2.0.1 behind proxy at a company I recently joined. I have git configured with
and my installs fail with:
|
@capaj we don't support the global config - proxy is handled entirely via environment variables, as described in https://github.com/request/request#controlling-proxy-behaviour-using-environment-variables. |
I hope my comment will help to understand the root of the problem. In my case the issue was repeatable and it had to do with running the 'jspm install' under an administrator console. I have managed to resolve this in two ways:
Following any of the above steps it resolved my issue. |
I'm having a similar issue whereby my jspm installs are failing behind proxy -
I've tried setting the http/s proxy env variables as described in the post but I still can't get around it. My jspm-github component is on version - 0.11.6 Any advice? |
Hi, Any ideas ? |
I would love for someone to suggest what needs to be done here myself. I have no test cases for proxys, so find this very difficult to work on. |
Same issue. Doesn't work behind corporate proxy on windows 7. This is blocker in using jspm.
Trying to run http://aurelia.io/get-started.html example. Neither "jspm install -y" or "jspm registry config github" works. proxy and https-proxy are correctly set in npm config (hence npm works proplery but not jspm). Also, tried setting http_proxy and https_proxy in windows console as env variable but no luck. |
In case someone wants to know this is not being run with admin access. error
|
It worked only after adding HTTP_PROXY and HTTPS_PROXY as user environment variables. Earlier I was just setting those two variables on command prompt using following command which didn't work.
However after this I got following error
To resolve this error - set "strictSSL": false, in C:\Users\AppData\Local.jspm\config file After which following command worked fine.
However, now I'm getting below error. Any idea how to fix it ? Thnx.
|
I have some problem with proxy too. After run: jspm install I have: Error: fatal: unable to access 'systemjs/plugin-text.git/': Could not resolve host: github.com How I fixed it? |
The text was updated successfully, but these errors were encountered: