Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

API request failed with status 401 - Error occurring from 10-Mar-2022

Rommel Fernandes
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!
March 9, 2022

Hi,

I am using bitbuket pipeline to run automation tests and have a step to upload the results at the end of the test execution using the pipe. This has worked fine for me since October 2021 and has stopped working today from 10-Mar-2022. My code snippet is as below:
- step:
script:
- apt-get update
- apt-get install zip -y
- zip EPPAutoTests/results_$BITBUCKET_BUILD_NUMBER.zip -r AutoTests/*.html
- pipe: atlassian/bitbucket-upload-file:0.3.2
variables:
BITBUCKET_USERNAME: $BITBUCKET_USERNAME
BITBUCKET_APP_PASSWORD: $BITBUCKET_APP_PASSWORD
FILENAME: AutoTests/results_$BITBUCKET_BUILD_NUMBER.zip

I have the above code working fine since October 2021, but when I executed it today I saw the below error in the pipeline:

INFO: Start uploading 1 files ['AutoTests/results_82.zip']...
✖ API request failed with status 401. Check your username and app password and try again.

My password is still the same and has not been changed for a long time. Also I tried entering the username and password again in the repository variable but I am still facing the issue today.

Can someone please help me with resolving this issue. Thanks.

 

1 answer

1 accepted

0 votes
Answer accepted
Rommel Fernandes
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!
March 10, 2022

I was earlier using my bitbucket password which I now replace with a bitbucket app password. Works fine now.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events