带有git URL的git ls-remote在Windows 7中抛出无效的参数错误

时间:2018-08-02 21:46:02

标签: git websocket

尝试使用以下npm命令安装web3软件包时出现错误。

$ npm install --save web3@1.0.0-beta.26 npm WARN deprecated fs-promise@2.0.3: Use mz or fs-extra^3.0 with Promise Support npm WARN deprecated tar.gz@1.0.7: ⚠️ WARNING ⚠️ tar.gz module has been deprecated and your application is vulnerable. Please use tar module instead: https://npmjs.com/tar npm ERR! Error while executing: npm ERR! C:\Users\****\AppData\Local\Programs\Git\mingw64\bin\git.EXE ls-remote -h -t git://github.com/frozeman/WebSocket-Node.git npm ERR! fatal: read error: Invalid argument npm ERR! exited with error code: 128 npm ERR! C:\Users\khuntu\AppData\Local\Programs\Git\mingw64\bin\git.EXE ls-remote -h -t git://github.com/frozeman/WebSocket-Node.git npm ERR! npm ERR! fatal: read error: Invalid argument

要调试此问题,请克隆webSocket存储库。当我使用以下命令时,从webSocket目录中获取无效参数错误。

MINGW64 ~/work/bc/inbox2/WebSocket-Node (master) $ git ls-remote -h -t git://github.com/frozeman/WebSocket-Node.git fatal: read error: Invalid argument

但是当我删除git URL时,没有任何错误。

MINGW64 ~/work/bc/inbox2/WebSocket-Node (master) $ git ls-remote -h -t From git@github.com:frozeman/WebSocket-Node.git 6c72925e3f8aaaea8dc8450f97627e85263999f2 refs/heads/browserifyCompatible a41afd46f977835a8646123891cb50b850ed736e refs/heads/draft-06 a9e1a9b8f866d7c12cd7877c506b260d629ad1b6 refs/heads/draft-07 d88cfec27184f9ca1d92f0c7cfb10c5d4914400f refs/heads/gh-pages 0b3d4a5eb253132b2219f6f22a420bfe4680e26a refs/heads/master 90d1d0f809b58b90343a69c57147241eed80c1e7 refs/heads/mocha 696e2765186be3e601a1c6255a7b31d004be1ab1 refs/heads/streams bb74e02145eea9af6e554366568d6bba8a24abd0 refs/tags/semver bb74e02145eea9af6e554366568d6bba8a24abd0 refs/tags/v0.0.1 . . . continue...

如果git使用以下cmd,我尝试使用https代替 git config --global url."https://".insteadOf git:// 但还没有运气。

我的问题是为什么在ls-remote中添加git URL会出现错误。我在Windows 10系统中使用Git bash和cmd。

0 个答案:

没有答案