Node.js npm不支持公司代理并从apm启动

Node.js npm不支持公司代理并从apm启动,node.js,git,atom-editor,Node.js,Git,Atom Editor,我和npm在代理后有问题 npm安装失败,因为从apm启动npm时无法进行git克隆,这很奇怪,因为apm外的同一命令行可以工作 npm ERR! Command failed: git -c core.longpaths=true fetch -a origin npm ERR! fatal: Unable to look up github.com (port 9418) (Unknown host.) .npmrc内容 proxy=http://proxy-xxx:8080 http-p

我和npm在代理后有问题

npm安装
失败,因为从apm启动npm时无法进行git克隆,这很奇怪,因为apm外的同一命令行可以工作

npm ERR! Command failed: git -c core.longpaths=true fetch -a origin
npm ERR! fatal: Unable to look up github.com (port 9418) (Unknown host.)
.npmrc内容

proxy=http://proxy-xxx:8080
http-proxy=http://proxy-xxx:8080
https-proxy=http://proxy-xxx:8080
.gitconfig内容

[url "https://"]
    insteadOf = git://
[url "https://github.com/"]
    insteadOf = git@github.com:
[http]
    proxy = proxy-xxx:8080
它似乎来自GitURL,这很奇怪,因为手动启动时,同一个命令也可以工作


我遗漏了什么?

在插件安装期间,主环境已设置为
%USERPROFILE%\.atom\.node gyp
。它显然不同于通常的git执行。 因此,我绕过了这个问题,将.gitconfig放在那里,它描述了HTTPS代理设置和模式替换规则

干杯, 亚恩