Repository navigation
wp package install failing in GitHub Actions #239
Description
Bug Report
- Yes, I reviewed the contribution guidelines.
- Yes, more specifically, I reviewed the guidelines on how to write clear bug reports.
Describe the current, buggy behavior
Error: Failed to get composer instance: Your github oauth token for github.com contains invalid characters: "***"
Caused by changes in GitHub token formats; fixed in Composer 2.10.
GitHub Actions step output:
Run wp package install wp-cli/dist-archive-command:@stable
wp package install wp-cli/dist-archive-command:@stable
shell: /usr/bin/bash -e {0}
env:
COMPOSER_PROCESS_TIMEOUT: 0
COMPOSER_NO_INTERACTION: 1
COMPOSER_NO_AUDIT: 1
Installing package wp-cli/dist-archive-command (v3.2.2)
Updating /home/runner/.wp-cli/packages/composer.json to require the package...
Registering https://github.com/wp-cli/dist-archive-command.git as a VCS repository...
Error: Failed to get composer instance: Your github oauth token for github.com contains invalid characters: "***"
Reverted composer.json.
Error: Process completed with exit code 1.
- github.blog Notice about upcoming new format for GitHub App installation tokens
- blog.packagist.org Composer 2.9.8 and 2.2.28 fix GitHub Actions token disclosure in error messages
Describe how other contributors can replicate this bug
I think this is a minimal GitHub Actions Workflow. See I am installing WP CLI via shivammathur/setup-php.tools then running a wp package install command in shell.
name: Build and attach releases
on:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: main
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
tools: composer, wp-cli
extensions: zip
- name: Get WP CLI version/platform/debug info
run: wp cli info
- name: Install dist-archive-command
run: wp package install wp-cli/dist-archive-command:@stableDescribe what you would expect as the correct outcome
The package should install without error.
Let us know what environment you are running this on
OS: Linux 6.17.0-1018-azure #18~24.04.1-Ubuntu SMP Thu May 28 16:39:11 UTC 2026 x86_64
Shell: /bin/bash
PHP binary: /usr/bin/php7.4
PHP version: 7.4.33
php.ini used: /etc/php/7.4/cli/php.ini
MySQL binary: /usr/bin/mysql
MySQL version: mysql Ver 8.0.46-0ubuntu0.24.04.3 for Linux on x86_64 ((Ubuntu))
SQL modes:
WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir: phar://wp-cli.phar/vendor
WP_CLI phar path: phar:///usr/local/bin/wp-cli
WP-CLI packages dir:
WP-CLI cache dir: /home/runner/.wp-cli/cache
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.12.0
Provide a possible solution
In wp-cli/package-command:
composer require composer/composer:"^2.10"Provide additional context/Screenshots
Failing run: https://github.com/BrianHenryIE/bh-wc-postcode-address-autofill/actions/runs/28556409890
Somehow the same issue did not happen as I re-ran to get debug info: https://github.com/BrianHenryIE/bh-wc-postcode-address-autofill/actions/runs/28556409890/job/84664672584. I presume this means the GitHub auth token may or may not have the invalid characters.
shivammathur/setup-php seems to be downloading https://github.com/wp-cli/builds/blob/gh-pages/phar/wp-cli.phar?raw=true
Activity