Composer安装\更新身份验证错误

时间:2016-02-01 14:55:15

标签: php git github composer-php phpstorm

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

> /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。

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

2 个答案:

答案 0 :(得分:1)

没有回购UserBundle,请参阅https://github.com/Djevil83?tab=repositories。也许UtilitiesBundle是合适的。 因此,请尝试将行更改为

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

composer.json

答案 1 :(得分:1)

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

document.addEventListener('DOMContentLoaded', function myFunction() {
    document.getElementById('one').focus();
    var x = document.activeElement.id;
    document.getElementById("showid").innerHTML = x;
}, false);

应该在不询问密码的情况下创建新目录git clone git@github.com:Djevil83/UserBundle.git

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