I've got a project that I wan to build with Jenkins. The project is hosted in a private GitHub repo and I've put the SSH public key in GitHub of my user "deploy".
The project gets checked out fine thanks to the deploy credential in Jenkins git plugin section in the build config. But a vendor lib which is hosted as private in same GitHub organisation is loaded via a build step command :
php composer.phar install -o --prefer-dist --no-dev
I've installed Jenkins git plugin in order to checkout the main repo from GitHub via private SSH key. But when the composer tries to checkout the sub project I get
Failed to clone the git@github.com:Organisation/Repo.git repository, try running in interactive mode so that you can enter your GitHub credentials
I've tried to get the composer command ran as a different user without success with stuff like :
su - deploy -c 'php composer.phar install -o --prefer-dist --no-dev'
looks weird anyway. I'd like to figure out the proper way of having the composer doing his job. Thought ?