Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Helps composer choose the right url for private packages from gitlab

License

Notifications You must be signed in to change notification settings

linniksa/composer-smart-source-url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Composer Smart Source Url

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

About

Helps composer choose the right url for private packages from gitlab

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages