I have a private Gitlab. There I have a repo which I do git clone from this address: [[email protected]:8888]:recsystem/robotRecSystem.git
Until node 7.2.1 (npm v3.10.10) I could install like this:
$ npm install git+ssh://[[email protected]:8888]:recsystem/robotRecSystem.git --save
[email protected] /home/pauloh/src/recsystem-web/src
└── [email protected] (git+ssh://[[email protected]:8888]:recsystem/robotRecSystem.git#b589aa1d17cb44d5c17e5fd69929a7a8b64c9eba)
But since node 8.9.0 (npm v5.5.1) when I get an error with the same command:
$ npm install git+ssh://[[email protected]:8888]:recsystem/robotRecSystem.git --save
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://%[email protected]/:8888]:recsystem/robotRecSystem.git
npm ERR!
npm ERR! ssh: Could not resolve hostname 10.15.8.210/: Name or service not known
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!
npm ERR! exited with error code: 128
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pauloh/.npm/_logs/2018-07-11T13_00_48_101Z-debug.log
Reading the error, npm fails when calling the command git ls-remote. It tryies this command:
/usr/bin/git ls-remote -h -t ssh://%[email protected]/:8888]:recsystem/robotRecSystem.git
It would work if I change this command to:
/usr/bin/git ls-remote -h -t [[email protected]:8888]:recsystem/robotRecSystem.git
So, I think the problems are:
- my url string
[[email protected]:8888]:recsystem/robotRecSystem.gitis not a normal url, since it is not aprotocol://user@hostname:port/path - npm is not parsing correctly my url string.
- npm is changing the character
[to%5Band it is not working - npm is prefixing the protocol
ssh://and it is not working
How could I change my url string to npm parse it correctly?