Riso-Enjinia

导航

记录GIT fatal: remote error: The unauthenticated git protocol on port 9418 is no longer support 问题的解决

今天测试编译新版ThingsBoard 3.3.4.1,给虚拟机搭好了梯子,编译中就出现了

fatal: remote error: The unauthenticated git protocol on port 9418 is no longer support

经过一顿爬文,找到了相应的两种解决办法。

仔细查看log,发现有个github的链接,点击进去,上面提示因为github的安全机制升级导致的问题。

然后官方给出的对应的解决方案:

解决不再支持端口 9418 上未经身份验证的 git 协议错误。

第一种解决方案是使用 https://github.com 而不是 git://github.com ,问题就可以解决。

第二种解决方案是在项目的 package.json 文件中找到url中的 git:// 并将其替换为 github: 即 git://github.com/…… 替换为 github:

解决方案
方案一 使用https:替换git:

git config --global url."https://".insteadOf git://


方案二 修改git://github.com/
在 package.json 文件中找到 git:// url 并将其替换为 github:

就像这样:

git://github.com/...
替换成

github:......
基本上问题解决,如果项目中存在package-lock.json文件的话,你需要修改package-lock.json文件

原文链接:https://blog.csdn.net/m290345792/article/details/123577379

 

posted on 2022-04-19 17:10  理想工科男  阅读(87)  评论(0编辑  收藏  举报