您好我正在建设Cordova项目。到目前为止一切进展顺利。但是,当我尝试使用github插件时,我得到错误。我几乎尝试了一切。
方式1 -
C:\Users\[userprofile]\myapp>node -v
v0.10.29
C:\Users\[userprofile]\myapp>npm -v
1.4.14
C:\Users\[userprofile]\myapp>cordova plugin add org.apache.cordova.file
Fetching plugin "org.apache.cordova.file" via plugin registry
Error: shasum check failed for C:\Users\[userprofile]\AppData\Local\Temp\npm-4436-
EoSdTU3O\1413449659175-0.3978349801618606\tmp.tgz
Expected: d2c5b2ce3d6d97ea613a6d50df8a93520c9de888
Actual: 3ec8e6146bd01a285916b4688ed335cdf3cdec4a
at C:\Users\[userprofile]\AppData\Roaming\npm\node_modules\cordova\node_module
s\cordova-lib\node_modules\npm\node_modules\sha\index.js:32:8
at ReadStream.<anonymous> (C:\Users\[userprofile]\AppData\Roaming\npm\node_mod
ules\cordova\node_modules\cordova-lib\node_modules\npm\node_modules\sha\index.js
:61:7)
at ReadStream.emit (events.js:117:20)
at _stream_readable.js:929:16
at process._tickCallback (node.js:419:13)
方式2 -
C:\Users\[userprofile]\myapp>cordova plugin add https://github.com/apache/cor
dova-plugin-file
Fetching plugin "https://github.com/apache/cordova-plugin-file" via git clone
Error: Command failed: Cloning into 'C:\Users\[userprofile]\AppData\Local\Temp\plu
gman\git\1413449787925'...
fatal: unable to access 'https://github.com/apache/cordova-plugin-file/': SSL ce
rtificate problem: self signed certificate in certificate chain
at ChildProcess.exithandler (child_process.js:647:15)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:755:16)
at Socket.<anonymous> (child_process.js:968:11)
at Socket.emit (events.js:95:17)
at Pipe.close (net.js:465:12)
这两种方式都没有帮助。请帮忙。 提前完成。
答案 0 :(得分:3)
尝试暂时关闭git SSL验证。在命令行上执行以下
git config --system http.sslverify false
之后再次运行插件命令。
cordova plugin add https://github.com/apache/cordova-plugin-file
<强>读:强>