I’ve got my own selfhosted instance of Gitlab, with a repo i include in a node.js project like this
{
...
"dependencies": {
"package-name": "git+ssh://git@GITSERVER/PATH/PROJECT.git#semver:~1.0.0",
...
}
}
The problem im having is that sometimes it works perfectly fine and downloads the repo and the other git dependencies inside the repo, but 9/10 i have to run npm install
multible times before it downloads and install all dependencies without erroring. The project has 8 or 10 other git dependencies it also have to download, all from my gitlab server. They are included the same way as the main package shown above.
The error i get is, and sometimes the it’s project 2 or 3 and sometimes it’s project 8 or 9 in the dependency list it fails on.
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects clone ssh://git@GITSERVER/PATH/PROJECT-XYZ /home/msv/.npm/_cacache/tmp/git-cloneKNBhFm --recurse-submodules
npm ERR! Cloning into '/home/msv/.npm/_cacache/tmp/git-cloneKNBhFm'...
npm ERR! kex_exchange_identification: Connection closed by remote host
npm ERR! Connection closed by x.x.x.x port 22
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.
Then you are propperly asking if i can conenct via SSH, and yes, yes i can.
ssh git@GITSERVER
PTY allocation request failed on channel 0
Welcome to GitLab, @MikkelSV!
Connection to GITSERVER closed.
If i just clone the repo with git clone i have no problems at all, it’s only though npm there is an issue. That sure sounds like a ratelimit… Well no, i’ve tried to disable the ratelimiting on gitlab and still no luck. The server is not bebind any proxy or something like that, that could mess with the connection.
At this point i’ve tried pretty much everything i can think of, even switching server host just to try it. (I had to move it anyways :P)