Whilst migrating my Yeoman dependency install to a bash script (that I could also run later), I inadvertently set my Github OAuth password to the string "process.env.GH_TOKEN"
.
[UnexpectedValueException]
Your github oauth token for github.com contains invalid characters: "process.env.GH_TOKEN"
Realising my error, I tried to change the string to a new value:
composer config -g github-oauth.github.com $GH_TOKEN
This didn't work, so then I tried to unset the bad value:
composer config -g --unset github-oauth.api.github.com
This also didn't work.
The solution was to manually delete the file used by Composer to store this information:
- Navigate to
COMPOSER_HOME
- Delete
auth.json