linniksa/composer-smart-source-url

This package is abandoned and no longer maintained. No replacement package was suggested.

Helps composer choose the right url for private packages from gitlab

Installs: 51 483

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 1

Type:composer-plugin

0.5.1 2021-01-13 11:21 UTC

This package is auto-updated.

Last update: 2021-10-13 13:30:31 UTC


README

This plugin helps composer choose the right url for private packages (e.g. for gitlab runner) from gitlab (github btw also supported), in conditions when you need to specify ssh url for repository in composer.json (e.g. for deployment).

When you specify auth credentials in auth.json, the plugin changes the URL scheme from ssh to http(s) on the fly (without touching any files).

Example

Add plugin to you project:

composer.phar require-dev linniksa/composer-smart-source-url

Add this lines to your .gitlab-ci.yml:

- >
      echo > auth.json -e '{
        "http-basic":{
          "[YOU DOMAIN]": {
            "username":"gitlab-ci-token",
            "password": "'${CI_JOB_TOKEN}'"
          }
        }
      }'

Don't forget to change [YOU DOMAIN].

Thats it, now your private repositories can be easily cloned by gitlab runner