My compsoser.json uses 2 private repositories from our Organisation Github Account and is as follows.
{
"name": "API",
"repositories": [
{
"type": "vcs",
"url": "[email protected]/company/private.git"
},
{
"type": "vcs",
"url": "[email protected]/company/private2.git"
}
],
"require": {
"php": ">=5.3.3",
"zendframework/zendframework": ">2.1.3",
"doctrine/mongodb-odm": "dev-master",
"doctrine/doctrine-mongo-odm-module": "dev-master",
"company/private": "dev-master",
"company/private2": "dev-master"
}
}
We've setup SSH keys and added them to the authorized keys on our staging server. When we run git clone it works perfectly and isn't asking for any credentials.
However, when we run composer update the fetching of the repositories fails because composer doesn't have access to the repositories.
Since this is ran in a non-interactive way as this is part of a build script we can't enter credentials and like to have this automated.
What can we do to let composer have access to our private repo's during the build?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…