【问题标题】:Composer install \ update authentication errorsComposer 安装\更新身份验证错误
【发布时间】:2016-05-10 02:02:12
【问题描述】:

当我尝试从我的私有存储库安装依赖项时,我收到以下错误:

> /opt/lampp/bin/php /home/arthur/Sites/audio-video-caption.com/composer.phar install
Loading composer repositories with package information
Failed to clone the git@github.com:Djevil83/UserBundle.git repository, try running in interactive mode so that you can enter your GitHub credentials


  [RuntimeException]                                                                                                                                        
  Failed to execute git clone --mirror 'git@github.com:Djevil83/UserBundle.git' '/home/arthur/.cache/composer/vcs/git-github.com-Djevil83-UserBundle.git/'  


install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]...


Process finished with exit code 1 at 15:40:11.
Execution time: 1 874 ms.

`

这是我的composer.json

"repositories": [
    {
        "type": "vcs",
        "url": "git@github.com:Djevil83/UserBundle.git"
    },
]

我正在使用 Debian 8 和 Xampp 与 php 7。

我不知道错误在哪里...感谢您的帮助!

【问题讨论】:

  • 请确认您是否创建了 github auth token 并配置了 composer 以使用。
  • @AlexBlex 你能开发吗?我是菜鸟...

标签: php git github composer-php phpstorm


【解决方案1】:

首先,确认您设置了对 repo 的访问权限:https://help.github.com/articles/adding-collaborators-to-a-personal-repository/,以便您可以使用您的私钥克隆它。命令:

git clone git@github.com:Djevil83/UserBundle.git

应该在不询问密码的情况下创建一个新目录UserBundle

然后阅读https://getcomposer.org/doc/articles/troubleshooting.md#api-rate-limit-and-oauth-tokens如何设置OAuth令牌以增加速率限制。

【讨论】:

    【解决方案2】:

    没有 repo UserBundle ,请参阅 https://github.com/Djevil83?tab=repositories。也许UtilitiesBundle 是正确的。 所以尝试将行改为

    "url": "git@github.com:Djevil83/UtilitiesBundle.git

    在您的composer.json 中。

    【讨论】:

    • UserBundle 是一个私有仓库。我可以在 Github 上看到它
    • 那么 alex-blex 的评论似乎是合理的 - 你需要你的 git 命令来验证自己。
    • @AlexBlex 是的,我也这样做了。
    • 太好了,您可以继续使用 OAuth 令牌
    • @AlexBlex 它有效;)!现在我有另一个问题,但它将是另一个帖子中的一个新问题......谢谢大家的帮助!
    猜你喜欢
    • 2014-04-23
    • 2014-03-05
    • 1970-01-01
    • 2018-11-04
    • 1970-01-01
    • 1970-01-01
    • 2013-03-07
    • 2014-10-11
    • 1970-01-01
    相关资源
    最近更新 更多