HTTP Basic: Access denied
| Build Stage | Job | Error Message | Category | Responsibility |
|---|---|---|---|---|
| Automatic Updates | Composer Update | remote: HTTP Basic: Access denied. If a password was provided for Git authentication, the password was incorrect or you're required to use a token instead of a password. | Application | Customer |
Potential cause
The most common cause is that the project access token used for Git authentication has expired and needs to be regenerated. All access tokens expire after 12 months.
Solution
To resolve this issue, complete the following tasks:
- Generate a new project access token.
- Update the corresponding variable in your CI/CD settings.
- Trigger a new pipeline run.
Generating a new project access token
- Log in to the Code Studio user interface.
- Navigate to the respective Code Studio project.
- In the left sidebar, go to Settings > Access tokens.
- Click Add new token.
- In the Token name field, type
acquia-codestudio. In the Expiration date field, click the X button to clear the date.
Clearing the date means that the token does not have an expiration.
- In the Select a role field, select Maintainer.
In the Select scopes section, select the api and write_repository checkboxes.
Click Create project access token.
Code Studio generates the token.
- Copy the token secret and save it to a secure location as you need to use in the next task.
Update the project access token variable
- In the left sidebar, go to Settings > CI/CD.
- Expand the Variables section.
- In the row for
ACQUIA_GLAB_TOKEN_SECRET, click the pencil icon to edit the variable. - In the Value field, add the token secret that you copied earlier.
Click Save changes.
Running the automatic updates pipeline
- In the left sidebar, go to Build > Pipeline schedules.
In the row for Code Studio Automatic Updates, click the play icon to run the scheduled pipeline.