0

Hi I am building cordova project. So far everything was going well. But when i tried using github plugins ,i get error. I have tried almost everything.

Way 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)

Way 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)

Neither way it helped. Please help. Thanx in advance.

megha
  • 141
  • 2
  • 15

1 Answers1

3

Try to temporarily switch off git SSL verification. On the command line execute following

git config --system http.sslverify false

after that run the plugin command again.

cordova plugin add https://github.com/apache/cordova-plugin-file

Read:

Github: error cloning my private repository

http://git-scm.com/docs/git-config

Community
  • 1
  • 1
AAhad
  • 2,805
  • 1
  • 25
  • 42
  • Thanku sir. I simply solved my problem. :-) I tried with- git config http.sslverify false . But that didnot work. What could be the reason sir? – megha Oct 16 '14 at 11:36
  • Is your Git path set ? if you type "git" on command line what you see ? Here you can find very good articles & tutorials to understand Git: http://git-scm.com/doc . Hope it will help you. Thanks – AAhad Oct 16 '14 at 11:50