Introduction:
When validating or processing a config.yml using the CircleCI CLI, some users may experience the following error
Error: config compilation request returned an error: invalid character 'I' looking for beginning of value
These errors are usually a result of upgrading to a newer release and a new token results in this behavior being mitigated.
Prerequisites:
CircleCI CLI Installed on your machine
Personal API Token
These are generated on this page in your user settings: https://app.circleci.com/settings/user/tokens
Solutions:
Pass your existing API token into the command using the
--tokenflagThis can be done using an existing token or by generating a new Personal API Token
circleci --token ${personal_api_token} config process .circleci/continue_config.yml -v
Rotate your Token
Navigate to your User Settings Page and generate a new API token for use with the CircleCI CLI
Use
circleci setupwith your newly generated tokenFollow the prompts that result and keep the generated new API token handy to set up the CLI with it
Outcome:
After rotating or passing the token into the command, the circleci commands run will behave as expected.
Additional Notes:
We have observed that this occurs mostly for users on macOS who have installed using
brewbut can impact any CircleCI CLI users after upgrading