Open yellek opened 9 years ago
Hi.
Can you show me how you set up your proxy in gradle?
Thanks.
In gradle.properties:
systemProp.http.proxyHost=localhost systemProp.http.proxyPort=3128 systemProp.http.nonProxyHosts=localhost systemProp.https.proxyHost=localhost systemProp.https.proxyPort=3128 systemProp.https.nonProxyHosts=localhost
This references a cntlm proxy I have running on my local machine to deal with windows proxy weirdness.
@yellek is the 407 from Gradle or the result of running npm from gradle? I am guessing the plugin calls out to npm which is configured differently I've had some shocking trouble behind ntlm proxies in some corporations too and even the above wont help.
I am behind a proxy, and with latest node and npm everything worked with proxy set as abose plus .npmrc:
https-proxy=... proxy=...
a hacky workaround to use JVM http settings. the finalizedBy dependency could be added to npmInstall aswell unfortunately our gulp tasks require them aswell
npmInstall.dependsOn 'npmHttpProxy'
npmInstall.dependsOn 'npmHttpsProxy'
gulpBuild.finalizedBy 'removeNpmHttpProxy'
gulpBuild.finalizedBy 'removeNpmHttpsProxy'
task npmHttpProxy(type: NpmTask, group: 'node') {
args = ['config', 'set', 'proxy', "http://${-> System.properties["http.proxyHost"]}:${-> System.properties["http.proxyPort"]}"]
}
task removeNpmHttpProxy(type: NpmTask, group: 'node') {
args = ['config', 'delete', 'proxy']
}
task npmHttpsProxy(type: NpmTask, group: 'node') {
args = ['config', 'set', 'https-proxy', "http://${-> System.properties["https.proxyHost"]}:${-> System.properties["https.proxyPort"]}"]
}
task removeNpmHttpsProxy(type: NpmTask, group: 'node') {
args = ['config', 'delete', 'https-proxy']
}
npmHttpProxy.onlyIf { System.properties.containsKey("http.proxyHost") }
npmHttpsProxy.onlyIf { System.properties.containsKey("https.proxyHost") }
Despite having a working proxy configuration for gradle the download still fails with a HTTP 407 error.