Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cordova add plugin via git ssh url?

Tags:

cordova

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.

like image 680
Sung Cho Avatar asked Dec 10 '15 00:12

Sung Cho


1 Answers

cordova plugin add git+ssh://%ssh-link-here%

It would look like

cordova plugin add git+ssh://[email protected]/path/to/plugin/repo.git
like image 61
Angly Cat Avatar answered Oct 07 '22 04:10

Angly Cat