Bower呼叫被企业代理阻止(Bower calls blocked by corporate proxy)

编程入门 行业动态 更新时间:2024-10-28 03:24:29
Bower呼叫被企业代理阻止(Bower calls blocked by corporate proxy)

我正在尝试使用Bower的网络应用程序,但发现自己遇到某种代理问题:

D:\>bower search jquery bower retry Request to https://bower.herokuapp.com/packages/search/jquery failed with ECONNRESET, retrying in 1.2s bower retry Request to https://bower.herokuapp.com/packages/search/jquery failed with ECONNRESET, retrying in 2.5s bower retry Request to https://bower.herokuapp.com/packages/search/jquery failed with ECONNRESET, retrying in 6.8s bower retry Request to https://bower.herokuapp.com/packages/search/jquery failed with ECONNRESET, retrying in 15.1s bower retry Request to https://bower.herokuapp.com/packages/search/jquery failed with ECONNRESET, retrying in 20.3s bower ECONNRESET Request to https://bower.herokuapp.com/packages/search/jquery failed: tunneling socket could not be established, cause=Parse Error

相关要点:

我可以浏览https://bower.herokuapp.com/packages/search/jquery并返回一个完整的json响应。 我可以使用git克隆,使用git://协议和http(s)。 我可以直接使用NPM,没有这些问题 我试过使用Fiddler来确定被阻止的内容,但是它没有检测到来自Bower命令的任何调用。 我可以在Fiddler看到来自NPM命令的呼叫。 我搜索了鲍尔问题列表,看到类似的问题,但他们没有解决方案,或者看起来和我不一样。

有任何想法吗?

I'm trying to use Bower for a web app, but find myself hitting some sort of proxy issues:

D:\>bower search jquery bower retry Request to https://bower.herokuapp.com/packages/search/jquery failed with ECONNRESET, retrying in 1.2s bower retry Request to https://bower.herokuapp.com/packages/search/jquery failed with ECONNRESET, retrying in 2.5s bower retry Request to https://bower.herokuapp.com/packages/search/jquery failed with ECONNRESET, retrying in 6.8s bower retry Request to https://bower.herokuapp.com/packages/search/jquery failed with ECONNRESET, retrying in 15.1s bower retry Request to https://bower.herokuapp.com/packages/search/jquery failed with ECONNRESET, retrying in 20.3s bower ECONNRESET Request to https://bower.herokuapp.com/packages/search/jquery failed: tunneling socket could not be established, cause=Parse Error

Relevant points:

I can browse to https://bower.herokuapp.com/packages/search/jquery and it returns a full json response. I can use git to clone, both using the git:// protocol and http(s). I can use NPM directly without these issues I've tried using Fiddler to determine what's being blocked, but it doesn't detect any calls from the Bower command. I can see calls from NPM commands in Fiddler. I've searched the Bower issues list, seen similar issues, but they either have no solution or it doesn't seem quite the same as mine.

Any ideas?

最满意答案

谢谢@ user3259967

这样做了。

我想补充说,如果您需要经过身份验证的代理服务器后,您可以将用户名/密码添加到.bowerrc文件中。

{ "directory": "library", "registry": "http://bower.herokuapp.com", "proxy":"http://<USERNAME>:<PASSWORD>@<PROXY_IP>:<PROXY_PORT>/", "https-proxy":"http://<USERNAME>:<PASSWORD>@<PROXY_IP>:<PROXY_PORT>/" }

注意在https-proxy中使用http://

Thanks @user3259967

This did the job.

I would like to add that if you are behind a proxy that needs to be authenticated, you can add the username/password to your .bowerrc file.

{ "directory": "library", "registry": "http://bower.herokuapp.com", "proxy":"http://<USERNAME>:<PASSWORD>@<PROXY_IP>:<PROXY_PORT>/", "https-proxy":"http://<USERNAME>:<PASSWORD>@<PROXY_IP>:<PROXY_PORT>/" }

NOTICE the use of http:// in https-proxy

更多推荐

本文发布于:2023-08-01 23:33:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1365707.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:企业   calls   Bower   proxy   corporate

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!