我无法使用composer下载github私有仓库。
php composer.phar update
我遇到了以下错误:
但是我可以使用无法下载文件 "https://api.github.com/repos/company/private1" (HTTP/1.1 404 Not Found)
git clone
轻松地下载这些私有 repos。Composer.json
"repositories": [
{
"type": "vcs",
"url": "git@github.com:company/private1.git",
"options": {
"ssh2": {
"username": "githubusername",
"pubkey_file": "/home/username/.ssh/id_rsa.pub",
"privkey_file": "/home/username/.ssh/id_rsa"
}
}
},
{
"type": "vcs",
"url": "git@github.com:company/private2.git",
"options": {
"ssh2": {
"username": "githubusername",
"pubkey_file": "/home/username/.ssh/id_rsa.pub",
"privkey_file": "/home/username/.ssh/id_rsa"
}
}
}
],
"require": {
"php": ">=5.4.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"
}
我尝试使用这个方法,但它并没有起作用。
SSH2 PECL也已启用。
我还创建了配置文件vim ~/home/.ssh/config
,具体细节如下:
host www.github.com
User githubusername
HostName github.com
IdentityFile /home/username/.ssh/id_rsa
但我仍然无法使用Composer下载私有存储库。
php composer.phar update
不起作用,但php composer.phar install
可以... - Gabf Hann