【发布时间】:2019-12-11 05:18:53
【问题描述】:
我有一个场景,我正在部署的机器无法直接访问 Git 存储库。所以解决方案是我将我的 repo 的 Git 包本地复制到将部署代码的机器上。
所以它看起来像这样。
/var/local/repos/MyGitRepo/MyGitRepo.git
如果我想在普通的 git 客户端上使用它,我可以这样做
git clone /var/local/repos/MyGitRepo/MyGitRepo.git MyGitRepo
我在 MyGitRepo 目录中签出了 MyGitRepo。
我的问题是,当我使用composer安装MyGitRepo时,我必须参考MyGitRepo签出的Git repo,而不是/var/local/repos/MyGitRepo/MyGitRepo.git
所以存储库看起来像这样:
{
"type" : "vcs",
"url" : "/where/i/put/MyGitRepo"
}
这可行,但我不能只将作曲家指向 git 存储库而不是签出的 git 存储库吗?
我觉得这应该可行:
{
"type" : "vcs",
"url" : "/var/local/repos/MyGitRepo/MyGitRepo.git"
}
我收到此问题的报告。
在任何版本中都找不到请求的包 mygitrepo, 包名可能有错别字。
如果我必须将 composer 指向已签出的本地存储库,那很好,但似乎我应该能够像使用任何 Git 存储库一样使用该 .git 包。
【问题讨论】:
标签: php git github composer-php