I would like to know if there is a way to add cordova plugin through git ssh url.
I have some plugins privately hosted on GitHub. When I initiate the project, cordova will fetch them via https, because I have defined the dependencies in config.xml
as follows:
...
<plugin name="my-plugin" spec="https://github.com/me/my-plugin.git" />
...
But I have to type in my username and password every time cordova installs these plugins. So I want to use ssh url.
I have tried to use git://
. Cordova CLI says it is fetching the repo by cloning, but it does not install the plugin. I also tried using git@
but that one throws an invalid format error. I also tried writing custom shell scripts and running cordova plugin add git://...
but it did not work.
I am using the Cordova CLI v5.4.1, latest at the time of writing.
cordova plugin add git+ssh://%ssh-link-here%
It would look like
cordova plugin add git+ssh://[email protected]/path/to/plugin/repo.git
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With