我无法与Netbeans建立Hello world
cordova项目。
我必须使用公司防火墙才能访问互联网。它是端口81的IP地址。我使用的是Windows 8.1。
我在npm,git和netbeans中配置了代理。在构建时我有一个错误(从输出窗口完整记录):
cordova.cmd plugins
cordova.cmd -d plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git
Calling plugman.fetch on plugin "https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git"
Fetching plugin "https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git" via git clone
Running command: "c:\Program Files\Git\bin\git.exe" clone --depth=1 https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git C:\Users\KORALE~1\AppData\Local\Temp\git\1444040988889
Command finished with error code 128: c:\Program Files\Git\bin\git.exe clone,--depth=1,https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git,C:\Users\KORALE~1\AppData\Local\Temp\git\1444040988889
CordovaError: Failed to fetch plugin https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git via git.
Either there is a connection problems, or plugin spec is incorrect:
Error: c:\Program Files\Git\bin\git.exe: Command failed with exit code 128 Error output:
Cloning into 'C:\Users\KORALE~1\AppData\Local\Temp\git\1444040988889'...
fatal: unable to access 'https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git/': Failed to connect to git-wip-us.apache.org port 443: Timed out
at C:\Users\KoralewskiP\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\plugman\fetch.js:88:33
at _rejected (C:\Users\KoralewskiP\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:797:24)
at C:\Users\KoralewskiP\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:823:30
at Promise.when (C:\Users\KoralewskiP\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:1035:31)
at Promise.promise.promiseDispatch (C:\Users\KoralewskiP\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:741:41)
at C:\Users\KoralewskiP\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:557:44
at flush (C:\Users\KoralewskiP\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:108:17)
at doNTCallback0 (node.js:407:9)
at process._tickCallback (node.js:336:13)
此外,当我运行命令
时"c:\Program Files\Git\bin\git.exe" clone --depth=1 https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git C:\Users\KORALE~1\AppData\Local\Temp\git\1444040988889
来自cmd,效果很好。
我还设置了HTTP_PROXY环境变量并重新启动了Netbeans,但它也没有帮助。
答案 0 :(得分:0)
您还需要设置HTTPS_PROXY
环境变量。