git - npm 安装错误 ssh
问题描述
我从https://github.com/maputnik/editor/releases/tag/v1.2.0下载了 maputnik 版本,并尝试在带有 ssh 锁的公司代理后面的 Windows 7 上使用 npm 安装。
我收到以下错误:
$ npm 安装 npm 错误!执行时出错: npm 错误!C:\Program Files\Git\mingw64\bin\git.EXE ls-remote -h -t ssh://git@github.com/josdejong/jsonlint.git npm 错误! npm 错误!ssh:连接到主机 github.com 端口 22:连接超时 npm 错误!致命:无法从远程存储库中读取。
在阅读了几篇关于 npm install behind proxy 的帖子后,我更改了我的 npm 和 git 配置:
npm(.npmrc 文件):
严格-ssl=false 代理=http://user:password@proxy.company.com:8080 https-proxy=http://user:password@proxy.company.com:8080 注册表=http://registry.npmjs.org/
混帐(.gitconfig 文件):
[http] 代理 = http://user:password@proxy.company.com:8080 sslverify = 假 [https] 代理 = http://user:password@proxy.company.com:8080 sslverify = 假 [网址“https://github.com/”] 相反= ssh://git@github.com/ [网址“https://”] 代替 = git://
现在至少git ls-remote -h -t ssh://git@github.com/josdejong/jsonlint.git
和git clone ssh://git@github.com/josdejong/jsonlint.git
工作。但我仍然得到同样的错误npm install
。
似乎该配置适用于 git 但不适用于 npm。还有其他地方我必须配置代理或 url 替换吗?
解决方案
推荐阅读
- c# - AspNet Core Serilog SQL 自定义列不起作用
- docker - 为 docker 容器创建一个空目录
- sas - 百分位如果和
- php - 层层路由作为 POST?
- reactjs - React - useRef 没有暂停视频
- android - Android:如何使用 shouldShowRequestPermissionRationale 检查权限状态?
- html - 隐藏的项目未正确显示在我想要的位置
- nginx - 具有 ssl 拦截的 Kubernetes 入口/反向和正向代理
- r - plotly R中的多行不使用add_trace
- c# - 向 DataGrid 添加新行显示为空白