The following command works on my windows machine (behind a very sensitive corporate firewall):
git clone http://bitbucket.org/geowerkstatt-hamburg/masterportalapi.git
But the following
npm i git+http://bitbucket.org/geowerkstatt-hamburg/masterportalapi.git
is throwing the error:
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote http://bitbucket.org/geowerkstatt-hamburg/masterportalapi.git
npm ERR! fatal: unable to access 'http://bitbucket.org/geowerkstatt-hamburg/masterportalapi.git/': SSL certificate problem: self signed certificate in certificate chain
npm ERR! A complete log of this run can be found in:
npm ERR! N:\npm-cache\_logs\2022-02-09T14_04_50_080Z-debug-0.log
Weird thing is that I'm actually using http (TLS same result). I've tried all kinds of settings and environment variables for git and npm to disable checks for self signed certificates in the first place. I've linked my root certificate directly as a parameter/setting, put it and the BitBucket certificate in the windows certificate chain, looked through all kind of guides and forums and nothing worked. Tried various versions of node, npm and git too.
Background: The command that's not working is in a package.json file.