After defining a new extension project to the Controller I have two problems:
-
During the construction phase it asks for a password, which causes it to fail because it’s not interactive (being run from Jenkins).
-
If I run construct.xml from the command line and enter the username and password by hand, it appears to work fine but only fetches the master branch from github.
Either way, the construct phase dies, and the Controller is not able to deploy to the web server. Is there something else I need to do in the Controller configuration to make this work?
First the password problem:
Check you have you set up your ssh keys (see http://help.github.com/mac-set-up-git/ and http://help.github.com/linux-set-up-git/)? You can check SSH is set up properly using this command:
Next, if ssh is okay and you still have the problems you describe, check the url you are using for your remote:
Note that you should be using the git protocol, and not https. If it’s wrong, you can enter the correct URL into the Controller configuration and run a build, or else from the command line can change it with this command:
Internally, the Controller uses “git fetch –all”. For some reason this doesn’t fetch all branches when using the https protocol, but the ssh protocol does.