Cravid
Cravid

Reputation: 683

Using private Composer VCS Git repo

I am trying to use my repo with composer. Fetching it as type package etc. worked well, but I would like to use it as a VCS.

So, I added a composer.json to my repository looking like this:

{
    "name": "gkm/storage",
    "authors": [
        {
            "name": "David Schunke",
            "email": "[email protected]"
        }
    ],
    "require": {
        "php": ">=5.3.0"
    },
    "autoload": {
        "psr-0": {
            "Gkm\\storage\\": ""
        }
    }
}

In the project, where I woult like to use the library from this repository, I added this composer.json:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "[email protected]:gkm/storage.git"
        }
    ],
    "require": {
        "gkm/storage": "*"
    }
}

Now, when I perform a composer update, it returns an error:

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

Unfortunately, I do not find very detailed information about this. Comparing it to third party libraries which do the same, but are just published via packagist.org instead of a custom repo server, it looks the very same.

Hope someone here will see whats wrong.

Upvotes: 1

Views: 1408

Answers (1)

Sven
Sven

Reputation: 70863

Did you tag a version? If not, Composer is unable to resolve "*" to a version, and you didn't allow development stability for that installed package.

Upvotes: 2

Related Questions