安装Stencil CLI / Framework - 错误无法连接到github.com

时间:2018-04-11 19:06:42

标签: bigcommerce

我正在尝试在Windows中安装Stencil CLI / Framework,并遵循这些说明https://stencil.bigcommerce.com/docs/installing-stencil-cli-1。我已安装并配置了所有先决条件。我在npm和git bash中配置了我的代理 每次我运行以下内容:

npm install -g @bigcommerce/stencil-cli

我收到以下错误:

npm WARN addRemoteGit Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
    npm WARN addRemoteGit
    npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:205:12)
    npm WARN addRemoteGit     at emitTwo (events.js:106:13)
    npm WARN addRemoteGit     at ChildProcess.emit (events.js:194:7)
    npm WARN addRemoteGit     at maybeClose (internal/child_process.js:899:16)
    npm WARN addRemoteGit     at Socket.<anonymous> (internal/child_process.js:342:11)
    npm WARN addRemoteGit     at emitOne (events.js:96:13)
    npm WARN addRemoteGit     at Socket.emit (events.js:191:7)
    npm WARN addRemoteGit     at Pipe._handle.close [as _onclose] (net.js:511:12)
    npm WARN addRemoteGit  git://github.com/bigcommerce/browser-sync.git resetting remote C:\Users\jeverett\AppData\Roaming\npm-cache\_git-remotes\git-github-com-bigcommerce-browser-sync-git-b8c22efb because of error: { Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
    npm WARN addRemoteGit
    npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:205:12)
    npm WARN addRemoteGit     at emitTwo (events.js:106:13)
    npm WARN addRemoteGit     at ChildProcess.emit (events.js:194:7)
    npm WARN addRemoteGit     at maybeClose (internal/child_process.js:899:16)
    npm WARN addRemoteGit     at Socket.<anonymous> (internal/child_process.js:342:11)
    npm WARN addRemoteGit     at emitOne (events.js:96:13)
    npm WARN addRemoteGit     at Socket.emit (events.js:191:7)
    npm WARN addRemoteGit     at Pipe._handle.close [as _onclose] (net.js:511:12)
    npm WARN addRemoteGit   killed: false,
    npm WARN addRemoteGit   code: 1,
    npm WARN addRemoteGit   signal: null,
    npm WARN addRemoteGit   cmd: 'git -c core.longpaths=true config --get remote.origin.url' }
    npm WARN deprecated github@8.2.1: 'github' has been renamed to '@octokit/rest' (https://git.io/vNB11)
    npm ERR! git clone --template=C:\Users\jeverett\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/bigcommerce/browser-sync.git C:\Users\jeverett\AppData\Roaming\npm-cache\_git-remotes\git-github-com-bigcommerce-browser-sync-git-b8c22efb: Cloning into bare repository 'C:\Users\jeverett\AppData\Roaming\npm-cache\_git-remotes\git-github-com-bigcommerce-browser-sync-git-b8c22efb'...
    npm ERR! git clone --template=C:\Users\jeverett\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/bigcommerce/browser-sync.git C:\Users\jeverett\AppData\Roaming\npm-cache\_git-remotes\git-github-com-bigcommerce-browser-sync-git-b8c22efb: fatal: unable to connect to github.com:
    npm ERR! git clone --template=C:\Users\jeverett\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/bigcommerce/browser-sync.git C:\Users\jeverett\AppData\Roaming\npm-cache\_git-remotes\git-github-com-bigcommerce-browser-sync-git-b8c22efb: github.com[0: 192.30.253.112]: errno=No error
    npm ERR! git clone --template=C:\Users\jeverett\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/bigcommerce/browser-sync.git C:\Users\jeverett\AppData\Roaming\npm-cache\_git-remotes\git-github-com-bigcommerce-browser-sync-git-b8c22efb: github.com[1: 192.30.253.113]: errno=No error
    npm ERR! Windows_NT 6.1.7601
    npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "@bigcommerce/stencil-cli"
    npm ERR! node v7.10.0
    npm ERR! npm  v4.2.0
    npm ERR! code 128

    npm ERR! Command failed: git -c core.longpaths=true clone --template=C:\Users\jeverett\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror git://github.com/bigcommerce/browser-sync.git C:\Users\jeverett\AppData\Roaming\npm-cache\_git-remotes\git-github-com-bigcommerce-browser-sync-git-b8c22efb
    npm ERR! Cloning into bare repository 'C:\Users\jeverett\AppData\Roaming\npm-cache\_git-remotes\git-github-com-bigcommerce-browser-sync-git-b8c22efb'...
    npm ERR! fatal: unable to connect to github.com:
    npm ERR! github.com[0: 192.30.253.112]: errno=No error
    npm ERR! github.com[1: 192.30.253.113]: errno=No error
    npm(Err!)
    npm(Err!)
    npm(Err!)
    npm ERR! If you need help, you may report this error at:
    npm ERR!     <https://github.com/npm/npm/issues>

有什么想法吗?

1 个答案:

答案 0 :(得分:1)

此命令解决了我的问题:

git config --global url."https://".insteadOf git://
相关问题