当我运行时npm install,大多数模块都配置正确。然而,至少有一个人想要点击一个ssh://地址来拉取模块。不幸的是,我的公司有一项政策,不允许内部网络之外的 SSH 连接。
我得到的具体错误是:
Error while executing:
npm ERR! C:\Program Files\Git\cmd\git.EXE ls-remote -h -t ssh://git@github.com/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
Run Code Online (Sandbox Code Playgroud)
我的 package.json 中没有定义 buble,所以它显然是一个其他依赖的库。
有没有办法将 NPM 配置为不使用 ssh:// 地址?我假设我应该能够像所有其他地址一样从 …