0

I get an error when i try to update one of my own created package through npm. The setup looks like this,

Windows 10
Running node.js v18.15.0
Repositories in self-hosted bitbucket server

In my package.json i have added my package as dependency like,

"my-package": "git+ssh://git@git:...."

When i run npm update my-package I get the error,

npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects clone ssh://git@git:... ... --recurse-submodules -- 
config core.longpaths=true
npm ERR! Cloning into ...
npm ERR! fetch-pack: unexpected disconnect while reading sideband packet
npm ERR! fatal: early EOF
npm ERR! fatal: fetch-pack: invalid index-pack output

I have tried everything in this thread fatal: early EOF fatal: index-pack failed without any success.

The weird thing is that it works sometimes and sometimes not so this might be a network issue?

Thank you in advance.

  • 1
    `git@git` seems strange: SSH URL should be `user@server:...`, like `git@github.com:...` – VonC Mar 21 '23 at 08:15
  • Why should it be like that? – python_is_my_snake Mar 27 '23 at 13:39
  • Because the remote SSH session *never* uses a user account, always a technical service account like `git`. The SSH key used to open the connection helps the remote server to know which user is making the request, since the public key is registered in the user settings. – VonC Mar 27 '23 at 13:49

0 Answers0