首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Symfony 2 bin/vendors:"fatal:'origin‘似乎不是git存储库“在远程机器上,在本地则很好

Symfony 2 bin/vendors:"fatal:'origin‘似乎不是git存储库“在远程机器上,在本地则很好
EN

Stack Overflow用户
提问于 2012-03-19 23:07:06
回答 2查看 1.1K关注 0票数 1
代码语言:javascript
复制
bin/vendors install

在我的本地机器上工作。然而,当我在我的远程测试机器上运行"bin/vendors install“时,我的deps文件中的三个条目失败,并显示以下消息:

代码语言:javascript
复制
> Installing/Updating aws-sdk-for-php
fatal: 'origin' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
> Installing/Updating AmazonWebServicesBundle
fatal: 'origin' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
> Installing/Updating Imagine
fatal: 'origin' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

deps中的其余条目在两台机器上都可以正常工作。这是我的deps文件:

代码语言:javascript
复制
[symfony]
    git=http://github.com/symfony/symfony.git
    version=v2.0.11

[twig]
    git=http://github.com/fabpot/Twig.git
    version=v1.6.0

[monolog]
    git=http://github.com/Seldaek/monolog.git
    version=1.0.2

[doctrine-common]
    git=http://github.com/doctrine/common.git
    version=2.1.4

[doctrine-dbal]
    git=http://github.com/doctrine/dbal.git
    version=2.1.6

[doctrine]
    git=http://github.com/doctrine/doctrine2.git
    version=2.1.6

[swiftmailer]
    git=http://github.com/swiftmailer/swiftmailer.git
    version=v4.1.5

[assetic]
    git=http://github.com/kriswallsmith/assetic.git
    version=v1.0.2

[twig-extensions]
    git=http://github.com/fabpot/Twig-extensions.git

[metadata]
    git=http://github.com/schmittjoh/metadata.git
    version=1.0.0

[SensioFrameworkExtraBundle]
    git=http://github.com/sensio/SensioFrameworkExtraBundle.git
    target=/bundles/Sensio/Bundle/FrameworkExtraBundle
    version=origin/2.0

[JMSSecurityExtraBundle]
    git=http://github.com/schmittjoh/JMSSecurityExtraBundle.git
    target=/bundles/JMS/SecurityExtraBundle
    version=origin/1.0.x

[SensioDistributionBundle]
    git=http://github.com/sensio/SensioDistributionBundle.git
    target=/bundles/Sensio/Bundle/DistributionBundle
    version=origin/2.0

[SensioGeneratorBundle]
    git=http://github.com/sensio/SensioGeneratorBundle.git
    target=/bundles/Sensio/Bundle/GeneratorBundle
    version=origin/2.0

[AsseticBundle]
    git=http://github.com/symfony/AsseticBundle.git
    target=/bundles/Symfony/Bundle/AsseticBundle
    version=v1.0.1

[aws-sdk-for-php]
    git=http://github.com/amazonwebservices/aws-sdk-for-php.git

[AmazonWebServicesBundle]
    git=http://github.com/Cybernox/AmazonWebServicesBundle.git
    target=/bundles/Cybernox/AmazonWebServicesBundle

[Imagine]
    git=http://github.com/avalanche123/Imagine.git
    target=imagine

感谢大家的帮助!我不知道从何说起……

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2012-03-21 02:06:39

代码语言:javascript
复制
bin/vendors install --reinstall

解决了我的问题。

"--reinstall“是您第一次在给定的存储库中运行它时所必需的,否则远程库将不会克隆到您的项目中。请看我上面的评论,以及symfony文档:

执行php bin/vendors install时,对于每个库,脚本首先检查安装目录是否存在。如果不存在(且仅当不存在),则运行git克隆。

http://symfony.com/doc/current/cookbook/workflow/new_project_git.html#managing-vendor-libraries-with-bin-vendors-and-deps

票数 0
EN

Stack Overflow用户

发布于 2012-03-19 23:44:53

可能的情况是,您遇到问题的存储库已经在您的远程计算机上的磁盘上(克隆应该可以工作,因为它们确实存在于github上),但它们的“源”被设置为不存在的存储库。

打开aws-sdk-for-php/.git/config并确保其url与deps文件中的url相同,例如下面的url应为

代码语言:javascript
复制
[remote "origin"]
        fetch = ..
        url = http://github.com/amazonwebservices/aws-sdk-for-php.git
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9772600

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档