【发布时间】:2015-10-01 16:14:23
【问题描述】:
我刚刚在 OS X 10.10 上安装了 Meteor,并且能够创建一个新项目,但我无法添加任何包。
Unable to update package catalog (are you offline?)
If you are using Meteor behind a proxy, set HTTP_PROXY and HTTPS_PROXY environment variables or
see this page for more details:
https://github.com/meteor/meteor/wiki/Using-Meteor-behind-a-proxy
=> Errors while adding packages:
While downloading numtel:mysql@1.0.3...:
error: SELF_SIGNED_CERT_IN_CHAIN
Your package catalog may be out of date.
Please connect to the internet and try again.
首先,我在公司防火墙后面,并且在系统和登录钥匙串中安装了公司的 CA 证书(所有设备的证书都使用该证书签名)。其他一切正常:curl、npm、Chrome 等。我唯一一次接近这样的事情是使用 Python 的 pip 命令,但即使我能够使用 --cert 选项将其指向 CA 证书绕过它抛出的自签名证书错误。
在看到其他几个有相同问题的帖子后,人们已经能够成功设置 HTTP_PROXY 和 HTTPS_PROXY 环境变量。但是,这对我来说不是一个可行的选择,因为该公司拥有数十台这样的设备,而且您似乎永远不会两次连接到同一个设备。
在最终发现要在其中一个上使用的正确端口后,我还是尝试了它,但是,我收到以下错误:
Unable to update package catalog (are you offline?)
If you are using Meteor behind a proxy, set HTTP_PROXY and HTTPS_PROXY environment variables or
see this page for more details:
https://github.com/meteor/meteor/wiki/Using-Meteor-behind-a-proxy
=> Errors while adding packages:
While downloading numtel:mysql@1.0.3...:
error: tunneling socket could not be established, cause=SELF_SIGNED_CERT_IN_CHAIN
Your package catalog may be out of date.
Please connect to the internet and try again.
请注意这次除了“SELF_SIGNED_CERT_IN_CHAIN”错误之外,您还看到“错误:无法建立隧道套接字”。
没有通过 Chrome 从 Atmosphere 手动下载和安装软件包(不是一个好主意)或在防火墙外尝试此操作(不幸的是不会发生),我不确定我可以在这里做些什么来完成这项工作。有任何想法吗?谢谢。
【问题讨论】:
-
这个问题你解决了吗?
-
并非如此。我能做的最好的是将包的 Git repos 检出到项目根目录的“包”文件夹中,然后从那里“流星添加包名”。唯一的问题是您必须手动下载这些软件包可能具有的任何依赖项。在 Meteor 1.3 中,可以使用 NPM 进行包管理,所以我希望 Atmosphere 在那之后会消失。一开始就不需要 NPM 以外的任何东西。
-
好的,谢谢您的回答! :-)