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:

  • Private repo composer.json not being used
  • Trying to get @dev version of a commit on a branch not working
  • Composer create-project: Working with forked repository
  • How to provide access to a git repository that is used by Composer
  • Wrong PHP version returned in Openshift
  • What is main differences between composer create-project and git clone?
  • {
        "name": "gkm/storage",
        "authors": [
            {
                "name": "David Schunke",
                "email": "my@email.me"
            }
        ],
        "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": "git@gitlab.my.domain.com: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.

  • How do I update my core project when using composer?
  • git jenkins and tags all together
  • Git reset --hard and a remote repository
  • How to add android studio project in same repo on github
  • git rebase, commits repeating
  • Finding large files in the history of a git repository fails
  • One Solution collect form web for “Using private Composer VCS Git repo”

    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.

    Git Baby is a git and github fan, let's start git clone.