The unauthenticated git protocol on port 9418 is no longer supported.

问题描述

最近使用使用npm install遇到The unauthenticated git protocol on port 9418 is no longer supported.是因为新版本git提升安全性加入了新特性(2022.1.11)导致的。

解决办法

第1步,修改git配置

shell中执行git config --global --edit打开git配置文件,添加如下内容

[url "https://"]
  insteadOf = ssh://
[url "https://"]
  insteadOf = git://

第2步,修改package.json配置

替换package.json中的git://github.comgit://github.com/具体可参考:https://github.com/che-incubator/che-workspace-telemetry-client/pull/76/files

参考:

  1. https://blog.csdn.net/qq_50796105/article/details/123655483
  2. https://stackoverflow.com/questions/70663523/the-unauthenticated-git-protocol-on-port-9418-is-no-longer-supported
posted @ 2022-04-09 10:43  ProcoRosso  阅读(192)  评论(0编辑  收藏  举报