简体   繁体   中英

Can't install forked github repository via composer

I made a fork from a repository on Github, and want to install it on my projects. I have the following composer.json

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

When I try to install it, I get this response:

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.

What am I doing wrong? Tried every solution from that link, but none worked.

You forked the repo but you didn't create a package in packagist.

If you check this file https://github.com/GuidoBR/instagram-api/blob/master/composer.json it is still using cosenary/instagram.

So go to http://www.packagist.com/ and create a new package it will require to have new composer.json file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM