我有一个库项目,我通过作曲家将其拉入我的主项目,如下所示:
"repositories": [
{
"type": "package",
"package": {
"name": "testsystems/libraries-project",
"version": "master",
"source": {
"url": "git@bitbucket.org:testsystems/libraries-project.git",
"type": "git",
"reference": "master"
},
"autoload": {
"psr-4": {
"Test\": "src/Test/"
}
}
}
}
],
然后根据需要:
"testsystems/libraries-project": "master"
问题是在安装此项目时composer update
失败,并显示以下消息:
Cloning into '/var/www/test/vendor/test/libraries'...
repository access denied.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
然后在~/.ssh/config
上我添加了:
Host bitbucket.org
HostName altssh.bitbucket.org
Port 443
有什么想法吗?
回答我的问题:使用 HTTPS 代替 Git 在我的情况下工作得很好。
https://thitami@bitbucket.org/testrepo/libraries-project.git