Open Calvin495 opened 2 years ago
Like this?
$ cat composer.json | jq --arg repo 'https://my.repman' '.repositories += [{"type": "composer", "repo": $repo}] | .repositories += [{"packagist.org": false}]' | tee composer.json
What it does is it reads your current composer.json and adds (or creates) repositories array with 2 objects: one is your repo
repman url, the other is somethings that's on Getting started
of packagist.org.
Should this command override the repositories
with those 2 entries at all times or just append them?
You can use these commands to setup repman authentication globally
composer config --global --auth http-basic.<org name>.repo.repman.io token <token here>
composer config --global repo.<org name> composer 'https://<org name>.repo.repman.io'
And there will be no need to add the information to your composer.json
We are trying to set up private packages in the repman. everything is going normal. we just have one question.
Is there a specific command using which we can register the repman repo and add its entry in the composer.json file automatically? just like https://packagist.com/ as they provide one composer config command that can add a repo in the composer.json file automatically. the command is as below.
composer config repositories.private-packagist composer
Currently, as far as we figured out we need to add the repman's entry in the composer.json file manually. Can anyone help with this?
NOTE: this is just a question/concern. this is not an issue