【发布时间】:2016-08-10 14:52:17
【问题描述】:
我尝试运行npm install -g polymer-cli,但每次运行它都会给我一个错误。
NPM 在为 git 和 npm 配置的公司代理后面运行。我安装 bower 或 gulp 没有问题,使用 git 克隆存储库也没有问题。
我试过这个没有结果:
git config --global url."https://".insteadOf git:// 从这里
Stack Overflow - git:// protocol blocked by company, how can I get around that?
这是输出的一部分:
31725 error Windows_NT 6.1.7601
31726 error argv "C:\\Users\\user\Documents\\Tools\\node-v6.3.1-win-x64\\node.exe" "C:\\Users\\user\\Documents\\Tools\\node-v6.3.1-win-x64\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "polymer-cli"
31727 error node v6.3.1
31728 error npm v3.10.5
31729 error code 128
31730 error Command failed: git -c core.longpaths=true clone --template=C:\Users\userAppData\Roaming\npm-cache\_git-remotes\_templates --mirror git@github.com:polymerelements/test-fixture.git C:\Users\user\AppData\Roaming\npm-cache\_git-remotes\git-github-com-polymerelements-test-fixture-git-8142662e
31730 error ssh: connect to host github.com port 22: Bad file number
31730 error fatal: Could not read from remote repository.
31730 error
31730 error Please make sure you have the correct access rights
31730 error and the repository exists.
【问题讨论】:
-
在使用引号作为包名时出现此错误:
npm install -g '@angular/cli'而不是npm install -g @angular/cli
标签: node.js git proxy npm polymer