Skip to content

THRIFT-5989: Work around JWT-format GITHUB_TOKEN breaking composer install#3470

Closed
Jens-G wants to merge 1 commit into
apache:masterfrom
Jens-G:THRIFT-5989
Closed

THRIFT-5989: Work around JWT-format GITHUB_TOKEN breaking composer install#3470
Jens-G wants to merge 1 commit into
apache:masterfrom
Jens-G:THRIFT-5989

Conversation

@Jens-G
Copy link
Copy Markdown
Member

@Jens-G Jens-G commented May 12, 2026

Summary

Follow-up to #3469: the COMPOSER_AUTH='{}' env-var approach in that PR does not work because it only overrides Composer's local auth.json. The global auth.json written by shivammathur/setup-php (which holds the invalid JWT token) is read and validated independently, before the env var takes effect.

This PR replaces the env-var workaround with an explicit composer config --global --unset github-oauth.github.com || true before each composer install call, removing the bad token at the source.

Affected steps: lib-php matrix ("Install Dependencies") and cross-test ("Install PHP dependencies").

Test plan

  • lib-php (8.x) jobs pass
  • cross-test job passes

🤖 Generated with Claude Code

…stall

Client: php

GitHub is rolling out a new GITHUB_TOKEN format (ghs_<id>_<jwt>) that
contains dots. shivammathur/setup-php passes this token verbatim to
composer config --global github-oauth.github.com. Composer's token
validator (BaseIO.php:143) rejects any token containing characters
outside [A-Za-z0-9-_], causing composer install to fail with:

  Your github oauth token for github.com contains invalid characters

Explicitly unset the global github-oauth config before each composer
install invocation (lib-php matrix and cross-test). This removes the
invalid token that setup-php wrote without modifying the action pin.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Generated-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@Jens-G Jens-G requested review from fishy and jimexist as code owners May 12, 2026 23:31
@mergeable mergeable Bot added the github_actions Pull requests that update GitHub Actions code label May 12, 2026
@Jens-G Jens-G self-assigned this May 12, 2026
@Jens-G
Copy link
Copy Markdown
Member Author

Jens-G commented May 12, 2026

Closing — replaced by a conflict-free branch. Reopening with correct head.

@Jens-G Jens-G closed this May 12, 2026
@Jens-G Jens-G deleted the THRIFT-5989 branch May 14, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant