Max Maximov
Max Maximov

Reputation: 123

Bitbucket Pipelines config for yii2. Need github token

I am trying to use bitbucket pipelines for my project, and i use simple config:

image: phpunit/phpunit:5.0.3

pipelines:
  default:
    - step:
        script: # Modify the commands below to build your repository.
          - composer --version
          - phpunit --version
          - composer global require "fxp/composer-asset-plugin:^1.2.0"
          - composer install
          - php init --env=Development --overwrite=All

But, at composer intall stage, i needs a github token, because yii2 is on github. So, how to run composer with token, using this config ?

Upvotes: 1

Views: 1077

Answers (1)

Gynteniuxas
Gynteniuxas

Reputation: 7103

It should be enough to set some configuration for Composer. A link what command(s) to use: API rate limit and OAuth tokens. Simple steps:

  1. Create an account on Github. You will get something like acd276d00a9de5a15743b7a0a33e39c0e7b8aed8. Be sure to make a note as you will not be able to look at it after some time.

  2. Use Composer terminal (Git, for example) and enter command:

    composer config -g github-oauth.github.com <oauthtoken>

Where <oauthtoken> is your token.

It should be configured now and Composer should now allow you to install.

Upvotes: 1

Related Questions