在企业防火墙后面运行 npm:我需要告诉安全团队什么? [英] Running npm behind a corporate firewall: what do I need to tell the security team?

查看:65
本文介绍了在企业防火墙后面运行 npm:我需要告诉安全团队什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试运行 node.js,但无法安装任何软件包,因为 npm 被阻止.我在这里尝试了解决方案:如何填写在 cntlm 配置文件中的代理信息中?,和这里:NTLM 代理背后的 NPM 并且仍然收到错误.我已经三次检查我是否遵循了说明,并且我的 ini 与说明具有相同的配置.

I am trying to run node.js but cannot install any packages as npm is blocked. I have tried the solutions here: How to fill in proxy information in cntlm config file?, and here: NPM behind NTLM proxy and still received errors. I have tripled checked that I have followed the instructions and my ini has the same configuration as the instructions.

我的下一步是要求安全团队允许通过防火墙进行 npm 访问,但我看不到任何关于此的文档.我需要告诉安全团队什么?

My next step is to ask the security team to allow npm access through the firewall, but I cannot see any documentation about this. What do I need to tell the security team?

注意:我知道npm Enterprise,但我认为在进入这一步之前,我需要使用npm.

Note: I am aware of npm Enterprise but I think before I get to that step I need to get established with npm.

推荐答案

是的,在您最简单的情况下,您需要做的就是其中之一

Yeah, in your simplest case all you need to do is one of these

npm config set proxy http://company.com:8000

npm config set https-proxy http://company.com:8000

其中 http://company.com:8000 是您的代理服务器和端口

where http://company.com:8000 is your proxy server and port

(注意 - 破折号,不是 _ 下划线)

(note the - dash, not _ underscore)

您还可以测试从那台机器对 http://registry.npmjs.org npm 注册表的访问.

Also can you test access to http://registry.npmjs.org the npm registry from that machine.

此外,您的 package.json 还包含需要提取 git 存储库代码的依赖项.您可能(很可能会)需要配置 git 以使用代理 也是.

Additionally your package.json also contains dependencies that require the pulling of a git repository code. You may (most likely will) need to configure git to use a proxy as well.

这篇关于在企业防火墙后面运行 npm:我需要告诉安全团队什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆