无法通过composer安装forked github存储库

时间:2015-09-25 16:33:08

标签: php github composer-php

我从Github上的存储库中创建了一个fork,并希望在我的项目中安装它。我有以下composer.json

{
    "repositories": [
        {   
            "url": "https://github.com/guidobr/instagram-api",
            "type": "git"
        }   
    ],  
    "require": {
        "guidobr/instagram-api": "*" 
    }   
}

当我尝试安装它时,我收到了这样的回复:

Loading composer repositories with package information
Installing dependencies (including require-dev)       
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package guidobr/instagram-api could not be found in any version, there may be a typo in the package name.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

我做错了什么?尝试了该链接中的每个解决方案,但都没有。

1 个答案:

答案 0 :(得分:-1)

你分叉了回购,但你没有在packagist中创建一个包。

如果您检查此文件https://github.com/GuidoBR/instagram-api/blob/master/composer.json,它仍在使用cosenary / instagram。

所以转到http://www.packagist.com/并创建一个新的包,它需要新的composer.json文件。

相关问题