These are chat archives for composer/composer

28th
Jul 2017
riksnelders
@riksnelders
Jul 28 2017 07:30
I need some help using composer and self hosted company package repo on gitlab How do i use composer require to pull from that gitlab first?
NeroMorto
@NeroMorto
Jul 28 2017 07:37
u can try specify repositories section in composer.json:
"repositories": [
{
"type": "vcs",
"url": "git@github.com:username/packagename.git"
}
]
and then u can try require ur package
riksnelders
@riksnelders
Jul 28 2017 07:37
So ill need to add every package seperatly?
I cant set composer to use my own gitlab server by default (and if not found use packagist?)
NeroMorto
@NeroMorto
Jul 28 2017 07:41
at the middle of article
riksnelders
@riksnelders
Jul 28 2017 07:42
"repositories": [ { "type": "composer", "url": "http://packages.example.org/" } ],
"require": {
"company/package": "1.2.0",
"company/package2": "1.5.2",
"company/package3": "dev-master"
}
}
that one ?
NeroMorto
@NeroMorto
Jul 28 2017 07:42
or this
{
"repositories": [{
"type": "composer",
"url": "https://example.org",
"options": {
"http": {
"header": [
"API-TOKEN: YOUR-API-TOKEN"
]
}
}
}]
}
need to check)
never used it before
riksnelders
@riksnelders
Jul 28 2017 07:43
But i can just use the gitlab server? No need to have a middleman like packagist or satis?
I'll go fiddle around some more :)
NeroMorto
@NeroMorto
Jul 28 2017 07:52
i think so. but every package should have a version specifyed like here:
https://github.com/symfony/symfony/blob/3.4/composer.json
or instead u need specify version in require command:
composer require blah/blah 0.1.1
riksnelders
@riksnelders
Jul 28 2017 07:52
allright
Kinda new to the private selfhosted stuff
:')
getting illegal port number
lol
git.server.com:thisisthrowingtheerror/laravel-packagethhing.git",
riksnelders
@riksnelders
Jul 28 2017 08:11
Nice, got it to work :)
NeroMorto
@NeroMorto
Jul 28 2017 08:12
Can u show what is solution worked?
riksnelders
@riksnelders
Jul 28 2017 08:13
had to set secure htpp to false for now
"repositories": [
{
"type": "package",
"package": {
"name": "xx/basic",
"version": "0.1.0",
"type": "package",
"source": {
"url": "http://git.xxxx.nl/xxxx/repo.git",
"type": "git",
"reference": "master"
}
}
}
],
But ill have to add every package
I'll have to figure out how to set that basic in name as a variabel or something
so the url would just be the url of the gitlab server
riksnelders
@riksnelders
Jul 28 2017 08:37
Its pulling in all the packages tho, eventho i specified 1