When I run npm install
the majority of modules are configured properly. However, at least one wants to hit an ssh://
address to pull the module. Unfortunately, my company has a policy not to allow SSH connections outside of the internal network.
The specific error I'm getting is:
Error while executing:
npm ERR! C:\Program Files\Git\cmd\git.EXE ls-remote -h -t ssh://[email protected]/pemrouz/buble.git
npm ERR!
npm ERR! ssh: connect to host github.com port 22: Connection timed out
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
I don't have buble defined in my package.json so it's obviously a library something else depends on.
Is there a way to configure NPM to NOT use ssh:// addresses? I assume I should be able to download the module(s) from an HTTP address like all of the others -- can I tell it to convert from SSH to HTTP always?
I've tried a few things I found online:
git config --global url."https://".insteadOf ssh://
and npm config set ssl-strict=false
These did not solve this particular problem.
[BUG] NPM v7 uses SSH instead of an explicit HTTPS for GitHub repos #2610.
If your npm is broken: On Mac or Linux, reinstall npm. Windows: If you're on Windows and you have a broken installation, the easiest thing to do is to reinstall node from the official installer (see this note about installing the latest stable version).
The npm install installs all modules that are listed on package. json file and their dependencies. npm update updates all packages in the node_modules directory and their dependencies.
I've tried a few things I found online:
git config --global url."https://".insteadOf ssh://
The actual command would be:
git config --global url."https://github.com".insteadOf ssh://[email protected]
Otherwise Git would try an URL like https://[email protected]
, which might not be well supported.
It npm
still mentions SSH, then check the user running the npm
command: it needs to the same as the one you did the global config.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With