Answer the question
In order to leave comments, you need to log in
How to upload your repository via composer?
Hey! I can't figure out how to get my own repository on githab via composer? In general, I decided to create my own repository on github (I tried both from the console and from the github and Github Desktop itself) everything is clear here, but how can I download it now?
I tried composer require username/my-repo, wrote in composer.json in the require section, nothing helps and does not download ...
here is an example of errors:
1.
via the console
Could not find a matching version of package username/my-repo. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (stable).
2. via require
The requested package username/my-repo could not be found in any version, there may be a typo in the package name.
I tried setting tags like 1.0.0 and then specifying them ("username/my-repo": "1.0.0"), still the same. Where am I doing something wrong?
composer.json (on git) with the following content:
{
"name": "username/my-repo",
"autoload": {
"psr-4": {
"username\\my-repo\\": ""
}
},
}
Tried changing the minimum-stability and stability-preferer in the composer.json of the project and what's on hand, just swapping errors instead of matches your minimum-stability (stable) => matches your minimum-stability (dev) .
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question