【发布时间】:2017-02-03 00:08:57
【问题描述】:
我无法使用 composer 下载 github 私有 repos
php composer.phar update
我收到以下错误
“https://api.github.com/repos/company/private1”文件无法 已下载(HTTP/1.1 404 未找到)
但我可以使用 git clone 轻松下载这些私人存储库
作曲家.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"
}
我尝试了this,但它不起作用
SSH2 PECL 也已启用。
我还创建了配置文件vim ~/home/.ssh/config
有以下详细信息
host www.github.com
User githubusername
HostName github.com
IdentityFile /home/username/.ssh/id_rsa
但我仍然无法使用 composer 下载私有仓库
【问题讨论】:
标签: php git github ssh composer-php