我在 Laravel 5.1 项目的composer.json 中有以下内容,用于添加公共 github 存储库作为依赖项。
...
"repositories": [
{
"type": "package",
"package": {
"name": "myVendorName/my_private_repo",
"version": "1.2.3",
"source": {
"type" : "git",
"url" : "git://github.com/myVendorName/my_private_repo.git",
"reference" : "master"
},
"dist": {
"url": "https://github.com/myVendorName/my_private_repo/archive/master.zip",
"type": "zip"
}
}
}
],
"require": {
....
"myVendorName/my_private_repo": "*",
},
...
只要存储库是公共的,这就有效。现在我已将此存储库设置为私有。我用于拉/推“my_private_repo”的 git 凭据是该项目合作者的凭据。当我运行时,如何实现作曲家从该私有存储库中提取内容作曲家更新 or 作曲家安装?
使用 GitHub 和 BitBucket 上的私有存储库:
JSON
{
"require": {
"vendor/my-private-repo": "dev-master"
},
"repositories": [
{
"type": "vcs",
"url": "[email protected] /cdn-cgi/l/email-protection:vendor/my-private-repo.git"
}
]
}
唯一的要求是为 git 客户端安装 SSH 密钥。
Docs https://getcomposer.org/doc/04-schema.md#repositories
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)