I am trying to get composer to download a library from my repository on Gitlab, however, it does not have a composer.json file in it so I'm not sure if this is possible.
"require": {
"username/repository-name"
},
"repositories": [{
"type": "package",
"package": {
"version": "dev-master",
"name": "username/repository-name",
"source": {
"url": "https://gitlab.com/username/repository.git",
"type": "git",
"reference": "master"
}
}
}],
Composer downloads directly from the source, e.g. Packagist only knows those source and tells your composer instance where to go. It does this by downloading a bunch of json files from Packagist.org that have all the infos.
I found the answer and it works for me here (the last answer, not the accepted answer):
Using Composer and Private Repository on GIthub using VCS on Build Server
This is what I make it works:
"repositories": [
{
"type": "package",
"package": {
"name": "username/repository",
"version": "0.1.0",
"type": "package",
"source": {
"url": "[email protected]:username/repository.git",
"type": "git",
"reference": "master"
}
}
}
],
"require": {
"username/repository": "*"
},
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With