ssh://[email protected]/nhn/raphael.git unsupported option “accept-new“ 记录启动VUE项目的经历

关键字:

https://github.com/nhn/raphael.gitunsupported option "accept-new",

现象:

E:\vueworkspace\vue-element-admin-master>npm install
npm ERR! Cannot read property 'package' of null

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\SZ\AppData\Local\npm-cache\_logs\2021-12-03T07_37_32_246Z-debug-0.log

E:\vueworkspace\vue-element-admin-master>cnpm install
\ [0/54] Installing tui-editor@1.3.3[tui-editor@1.3.3 › squire-rte@github:sohee-lee7/Squire#b1e0e1031fa18912d233c204cbe7c7fae4a42621] install squire-rte from git squire-rte@github:sohee-lee7/Squire#b1e0e1031fa18912d233c204cbe7c7fae4a42621, may be very slow, please keep patience
/ [53/54] Installing tui-color-picker@^2.2.1[tui-editor@1.3.3 › tui-chart@3.11.3 › raphael@git+https://github.com/nhn/raphael.git#2.2.0-c] install raphael from git raphael@git+https://github.com/nhn/raphael.git#2.2.0-c, may be very slow, please keep patience
× Install fail! Error: [tui-editor@1.3.3 › tui-chart@3.11.3 › raphael@git+https://github.com/nhn/raphael.git#2.2.0-c] git dep preparation failed
Error: [tui-editor@1.3.3 › tui-chart@3.11.3 › raphael@git+https://github.com/nhn/raphael.git#2.2.0-c] git dep preparation failed
    at module.exports (C:\Users\SZ\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\lib\download\git.js:36:11)
npminstall version: 5.3.1
npminstall args: E:\Program Files\nodejs\node.exe C:\Users\SZ\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\bin\install.js --fix-bug-versions --china --userconfig=C:\Users\SZ\.cnpmrc --disturl=https://npmmirror.com/mirrors/node --registry=https://registry.npmmirror.com

E:\vueworkspace\vue-element-admin-master>npm install
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/nhn/raphael.git
npm ERR! command-line line 0: unsupported option "accept-new".
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\SZ\AppData\Local\npm-cache\_logs\2021-12-03T07_45_59_864Z-debug-0.log

解决方法:升级git到最新版本

原因:

旧版本的OpenSSH太低 信息来源

内容是

If your `npm install git+ssh://...` fails with `unsupported option "accept-new"`, it's because you have a recent npm and ancient OpenSSH (<7.6); `GIT_SSH_COMMAND=ssh` works around that

this is the commit that changed npm's behaviou

辛苦历程:

是的我又开始前后台一起写了。

对于vue 技术本来就是不太熟悉,自从上一次写完以后,已经好久没有再碰了。还是老路子直接下载一个vue-element-admin的版本,自己改改。

下载顺利,npm install。。。。。。。开始了,各种下载不下来,

1、发现下载的时候有一个git 资源下载不下来,然后开了翻墙的软件,试了好多次(以为就算网络不好多下几次应该总有一次下载的下来吧),以失败告终。

2、怀疑是不是其他问题 检查了npm的版本,vue的版本,设置cnpm的源,然后没有用

3、结合错误日志中间看到有SSH的问题,有一个权限不允许,然后又在GitHub上添加了SSH密钥。还是不行。

4、百度了半天也没什么用基本都是什么删除模块下载文件以后重新下载、设置cnpm的下载源、清空缓存、重启、修改npm版本之类的。总而言之无屌用。

5、换了个电脑查谷歌,不得不说人家还是有用,(链接和截图前边已经放了)我这英语菜鸡,一眼看明白了是OpenSSH的版本低了,他推荐的是修改配置“GIT_SSH_COMMAND=ssh”,然后说这个操作会修改npm的提交,可是这个操作对我来说有点难。我想了想升级下OpenSSH不就可以了么。那么问题来了谁用了OpenSSH?那就是git了吧。

6、升级git 还是比较简单的直接下载然后覆盖安装就行了,不要尝试在线升级,会体验到什么叫2G网速。

7、我特么终于把它运行起来了。

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 10
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 10
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值