How can I resolve a missing token error? Date Published: May 27, 2025
Description
Build stage Job Error message Category Responsibility Varies Varies Error writing data to auth/jwt/login: Error making API request. Code: 400. Errors: * missing tokenApplication Customer
Potential cause
This error occurs if you customize your pipeline to use the CI_JOB_JWT variable or a similar token. The CI_JOB_JWT variable is deprecated in GitLab.
Solution
If you use the CI_JOB_JWT variable, then remove it. Add the following script to the stage or the job that you customized:
copy id_tokens:
VAULT_ID_TOKEN:
aud: $VAULT_ADDR For example, if a custom job in the Test Drupal stage is Build artifact and deploy to CI Server , you must update the .gitlab-ci.yml file as follows:
copy "Build artifact and deploy to CI Server":
stage: "Build Drupal"
id_tokens:
VAULT_ID_TOKEN:
aud: $VAULT_ADDR