Because of working from home, after downloading the code from the remote clone
, I found that using npm install
has been failing.
error
fatal: remote error: The unauthenticated git protocol on port 9418 is no longer support
At first I thought it was because of the node
version problem. I used to toss myself to death because of the version problem. After node --version
, the version is found to be OK.
If it's not a version problem, what's causing the problem?
Check the log
carefully and find a link to github, click it, and it prompts the problem caused by the upgrade of github's security mechanism.
Then the corresponding solution given by the official:
Resolve unauthenticated git protocol error on port 9418
is no longer supported.
The first solution is to use https://github.com
instead of git://github.com
and the problem will be solved.
The second solution is to find the git://
in the url
in the project's package.json
file and replace it with github:
i.e. git://github.com/…
Replace with github:
.
Replace git:
with https:
git config --global url."https://".insteadOf git://
Modify git://github.com/
Find the git:// url
in the package.json
file and replace it with github:
like this:
git://github.com/…
replace with
github:......
Basically the problem is solved, if there is a package-lock.json
file in the project, you need to modify the package-lock.json
file