I created a library on my gitolite server with a composer.json
{
"name": "package/package-name",
"type": "library",
"description": "Wine Extension for Wordpress",
"keywords": ["Page Management"],
"license": "MIT",
"authors": [
{
"name": "Author",
"email": "[email protected]"
}
],
"require": {
"php": ">=5.3.2"
},
"autoload": {
"psr-4": { "Prefix\\PackageName\\": "src/" }
},
"extra": {
"branch-alias": {
"dev-master": "master"
}
}
}
And then I want to include them in other project, so I add on my repositories like this.
[
"repositories": [
{
"type": "vcs",
"url": "[email protected]:Library/PackageName"
}
],
"require": {
"package/package-name": "master",
},
]
I have exact the same composer.json file on another library on github. However on Github it works, but not on gitolite. I wonder if this has something to do with the Gitolite, if the Gitolite doesn't support it. Can someone explain to me? on github, the package also not available on Packagist. So I think this should not be the problem.
The error I got from Gitolite:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package package/package-name 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://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
both "dev-master" or "master" are not working.
but if I require the package like this, it works.
{
"type": "package",
"package": {
"name": "package/package-name",
"version": "dev",
"type": "package",
"source": {
"url": "[email protected]:Library/PackageName",
"type": "git",
"reference": "master"
},
"require": {
"php": ">=5.3.2",
"leafo/scssphp": "^0.3.2"
},
"autoload": {
"psr-0": { "Prefix\\PackageName\\": "src/" }
}
}
}
Has someone idea how to solve this? I would like to use vcs. It would be easier to manage. thank you!
I don't think that stable version the problem like most of them. Using private Composer VCS Git repo Composer VCS repository not loading dependancies Optimize multiple Composer VCS repository paths