apigee / edge-launchpad

A deployment tool for apigee solutions. Helps orchestrating the deployement of any solution comprising of apps, products, developer, proxy, baas data etc
Apache License 2.0
11 stars 9 forks source link

point apigeetool to npm registry module #15

Open rohan-m opened 7 years ago

rohan-m commented 7 years ago

https://github.com/apigee/edge-launchpad/blob/60772be6c984261daf6b94c811d46e2718dd548c/package.json#L4

need to change this and point it to the apigeetool repo from the npm registry using local reference is causing certificates issues

kidiyoor commented 7 years ago

We used fork'd repo of apigeetool because the turn around time to fix a bug of apigeetool in the main repo and publish the new npm is huge . But we can fix it in the fork and already start using it(and raise a PR).

What certificates issues are you seeing ? Is there another way to solve it other than changing the apigeetool reference to public npm ?

rohan-m commented 7 years ago

Find part of the npm debug log having problem with the self signed certificate.

855 info git [ 'clone',
855 info git   '--template=C:\\Users\\username\\AppData\\Roaming\\npm-cache\\_git-remotes\\_templates',
855 info git   '--mirror',
855 info git   'https://github.com/kidiyoor/apigeetool-node.git',
855 info git   'C:\\Users\\username\\AppData\\Roaming\\npm-cache\\_git-remotes\\git-https-github-com-kidiyoor-apigeetool-node-git-master-4f6448c2' ]
856 error git clone --template=C:\Users\username\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror https://github.com/kidiyoor/apigeetool-node.git C:\Users\username\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-kidiyoor-apigeetool-node-git-master-4f6448c2: Cloning into bare repository 'C:\Users\username\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-kidiyoor-apigeetool-node-git-master-4f6448c2'...
856 error git clone --template=C:\Users\username\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror https://github.com/kidiyoor/apigeetool-node.git C:\Users\username\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-kidiyoor-apigeetool-node-git-master-4f6448c2: fatal: unable to access 'https://github.com/kidiyoor/apigeetool-node.git/': SSL certificate problem: self signed certificate in certificate chain
857 silly fetchPackageMetaData Error: Command failed: git -c core.longpaths=true clone --template=C:\Users\username\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror https://github.com/kidiyoor/apigeetool-node.git C:\Users\username\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-kidiyoor-apigeetool-node-git-master-4f6448c2
857 silly fetchPackageMetaData Cloning into bare repository 'C:\Users\username\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-kidiyoor-apigeetool-node-git-master-4f6448c2'...
857 silly fetchPackageMetaData fatal: unable to access 'https://github.com/kidiyoor/apigeetool-node.git/': SSL certificate problem: self signed certificate in certificate chain
857 silly fetchPackageMetaData
857 silly fetchPackageMetaData     at ChildProcess.exithandler (child_process.js:206:12)
857 silly fetchPackageMetaData     at emitTwo (events.js:106:13)
857 silly fetchPackageMetaData     at ChildProcess.emit (events.js:191:7)
857 silly fetchPackageMetaData     at maybeClose (internal/child_process.js:877:16)
857 silly fetchPackageMetaData     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
857 silly fetchPackageMetaData  error for apigeetool@git+https://github.com/kidiyoor/apigeetool-node.git#master { Error: Command failed: git -c core.longpaths=true clone --template=C:\Users\username\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror https://github.com/kidiyoor/apigeetool-node.git C:\Users\username\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-kidiyoor-apigeetool-node-git-master-4f6448c2
857 silly fetchPackageMetaData Cloning into bare repository 'C:\Users\username\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-kidiyoor-apigeetool-node-git-master-4f6448c2'...
857 silly fetchPackageMetaData fatal: unable to access 'https://github.com/kidiyoor/apigeetool-node.git/': SSL certificate problem: self signed certificate in certificate chain
857 silly fetchPackageMetaData
857 silly fetchPackageMetaData     at ChildProcess.exithandler (child_process.js:206:12)
857 silly fetchPackageMetaData     at emitTwo (events.js:106:13)
857 silly fetchPackageMetaData     at ChildProcess.emit (events.js:191:7)
857 silly fetchPackageMetaData     at maybeClose (internal/child_process.js:877:16)
857 silly fetchPackageMetaData     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
857 silly fetchPackageMetaData   killed: false,
857 silly fetchPackageMetaData   code: 128,
857 silly fetchPackageMetaData   signal: null,
857 silly fetchPackageMetaData   cmd: 'git -c core.longpaths=true clone --template=C:\\Users\\username\\AppData\\Roaming\\npm-cache\\_git-remotes\\_templates --mirror https://github.com/kidiyoor/apigeetool-node.git C:\\Users\\username\\AppData\\Roaming\\npm-cache\\_git-remotes\\git-https-github-com-kidiyoor-apigeetool-node-git-master-4f6448c2' }
858 silly rollbackFailedOptional Starting
859 silly rollbackFailedOptional Finishing
860 silly runTopLevelLifecycles Finishing
861 silly install printInstalled
862 verbose stack Error: Command failed: git -c core.longpaths=true clone --template=C:\Users\username\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror https://github.com/kidiyoor/apigeetool-node.git C:\Users\username\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-kidiyoor-apigeetool-node-git-master-4f6448c2
862 verbose stack Cloning into bare repository 'C:\Users\username\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-kidiyoor-apigeetool-node-git-master-4f6448c2'...
862 verbose stack fatal: unable to access 'https://github.com/kidiyoor/apigeetool-node.git/': SSL certificate problem: self signed certificate in certificate chain
862 verbose stack
862 verbose stack     at ChildProcess.exithandler (child_process.js:206:12)
862 verbose stack     at emitTwo (events.js:106:13)
862 verbose stack     at ChildProcess.emit (events.js:191:7)
862 verbose stack     at maybeClose (internal/child_process.js:877:16)
862 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
863 verbose cwd C:\Projects\flame-master
864 error Windows_NT 6.1.7601
865 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
866 error node v6.9.1
867 error npm  v3.10.8
868 error code 128
869 error Command failed: git -c core.longpaths=true clone --template=C:\Users\username\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror https://github.com/kidiyoor/apigeetool-node.git C:\Users\username\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-kidiyoor-apigeetool-node-git-master-4f6448c2
869 error Cloning into bare repository 'C:\Users\username\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-kidiyoor-apigeetool-node-git-master-4f6448c2'...
869 error fatal: unable to access 'https://github.com/kidiyoor/apigeetool-node.git/': SSL certificate problem: self signed certificate in certificate chain
870 error If you need help, you may report this error at:
870 error     <https://github.com/npm/npm/issues>
871 verbose exit [ 1, true ]
kidiyoor commented 7 years ago

I don't see this problem in my system. For quick fix, may be you can disable ssl for this repo - git config http.sslVerify false (this will disable ssl check, security risk) or use SSH protocol(no certs are verified) by replacing git+https://github.com/kidiyoor/apigeetool-node.git#master with git://github.com/kidiyoor/apigeetool-node.git#master

rohan-m commented 7 years ago

Its better to have a fix rather then a workaround, Not everyone using it will be aware of such workarounds. The above scenario was faced on a windows OS.

If the apigeetool is now upto date and published to npm we should point apigeetool from the npm registry. If not we should push for those changes to take place :)