Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Clear Caches Pipe does not work

Antoni Florit
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 3, 2022

We are using Clear Caches Pipe to clear the "node" cache and the "cypress" custom cache so every run we do the step with Bitbucket's Clear Caches Pipe script ends with a 404 error with the following message:


✖ Failed to retrieve caches: 404 {"type": "error", "error": {"message": "Resource not found"}}
The step with the script is as follows:
    - step: &clear-cache
        name: delete cache if changes in the build dependencies
        - pipe: atlassian/bitbucket-clear-cache:3.1.1
             CACHES: ["cypress", "node"]
             - package.json
Can anyone help us?

1 answer

1 accepted

1 vote
Answer accepted
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 5, 2022

Hello @Antoni Florit ,

Thank you for reaching out to Atlassian Support.

The error you are receiving is from one of the API calls the pipe is doing behind the scenes, where it gets all the caches from the repository. A 404 response from that API either means that the repository does not exist (which is not the case here), or the credentials being used to authenticate does not have access to it.

So could you please confirm if the bitbucket username you set as the variable $BITBUCKET_USERNAME is correct, and if that user has access to the repository where the pipeline is running ? Also, make sure this is the bitbucket username of the account, not the e-mail address. You can check the username going to the account's personal settings

Additionally, please make sure the App Password you are using has the required permissions. To narrow down if the issue if with the permissions of the app password you are currently using, you can try creating a new app password with full permissions checked and test if using it the pipe completes successfully.

Hope that helps! Let me know if you run into any issues.

Thank you @Antoni Florit ,

Kind regards,

Patrik S

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events