Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save labboy0276/84a2b0fe7ddd8a67f7f881752c4c2741 to your computer and use it in GitHub Desktop.
Save labboy0276/84a2b0fe7ddd8a67f7f881752c4c2741 to your computer and use it in GitHub Desktop.
Using a GitHub Personal Access Token for Private Composer Packages on Platform.sh
  1. Visit https://github.com/settings/tokens.

  2. Click Generate new token

  3. Use the repo scope and give it a name.

  4. Run this command:

platform variable:create --project PROJECT-ID --level project --name env:COMPOSER_AUTH \
  --json true --visible-runtime false --sensitive true --visible-build true \
  --value '{"github-oauth": {"github.com": "YOUR-TOKEN"}}'
  1. Clear the build cache with:
platform project:clear-build-cache --project PROJECT-ID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment