gpt4 book ai didi

symfony - 通过 Composer 更新时不是 git 存储库错误

转载 作者:行者123 更新时间:2023-12-01 07:07:21 24 4
gpt4 key购买 nike

我正在尝试使用 composer 将我的 Symfony 2 项目从 2.1.4 更新到 2.1.7 并运行 php composer.phar update像往常一样,在更新了一些依赖项后,我收到以下错误:

[RuntimeException]
Failed to clone http://github.com/fabpot/Twig-extensions via git, https
and http protocols, aborting.

- git://github.com/fabpot/Twig-extensions
fatal: Not a git repository (or any of the parent directories): .git

- https://github.com/fabpot/Twig-extensions
fatal: Not a git repository (or any of the parent directories): .git

- http://github.com/fabpot/Twig-extensions
fatal: Not a git repository (or any of the parent directories): .git

我检查了 URL 并且可以确认它存在,我也可以 git clone它没有来自同一个 CLI 的任何问题。

奇怪的是,如果我运行 php composer.phar update twig/extensions单独它似乎更新没有问题。

最佳答案

如果您有一个旧的 symfony 副本,该副本随供应商安装为 git repos 但删除了 git repos,则通常会发生这种情况。要修复它,您应该只删除供应商目录,以便他们从头开始重新安装作为 git 克隆或 zip 存档,但没有任何先前的假设。

关于symfony - 通过 Composer 更新时不是 git 存储库错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14390972/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com