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

Failed to upload test report . Using user and password as auth.

Fredrik Svärd
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!
August 18, 2024

 

Digest: sha256:25f4f1919324ff3da504da3c2837e83f5f4bfa8e74decca0c3c2c5e0319f7381
86
Status: Downloaded newer image for bitbucketpipelines/bitbucket-upload-file:0.7.3
87
DEBUG: Starting new HTTPS connection (1): bitbucket.org:443
88
DEBUG: https://bitbucket.org:443 "GET /bitbucketpipelines/official-pipes/raw/master/pipes.prod.json HTTP/11" 200 None
89
INFO: Executing the pipe...
90
INFO: Start uploading 1 files ['test-reports/report.xml']...
91
DEBUG: Starting new HTTPS connection (1): api.bitbucket.org:443
92
DEBUG: https://api.bitbucket.org:443 "POST /2.0/repositories///downloads HTTP/11" 403 57
93
✖ Failed to upload files ['test-reports/report.xml']. Status code: 403. Message: This endpoint does not support token-based authentication.
94

2 answers

0 votes
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 23, 2024

@Fredrik Svärd hi. Thank you for your question.
According to your logs 

DEBUG: https://api.bitbucket.org:443 "POST /2.0/repositories///downloads HTTP/11" 403 57
93

Seems like you do not have environment variables:
BITBUCKET_REPO_OWNER
BITBUCKET_REPO_SLUG

Usually they should be defined by default when you ran a pipeline.
Check if they are present in pipelines log Build setup
Screenshot 2024-08-23 at 17.08.28.png
If these variables not present in your pipelines log build setup, then provide a link to your failed pipeline.

Regards, Igor
0 votes
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 20, 2024

G'day, @Fredrik Svärd 

Welcome to the community!

You should generate an App password as your credentials. The combination should be your username as well as App Password.

Let me know if that works.

Regards,
Syahrul

Fredrik Svärd
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!
August 22, 2024

Hi!

I have already tried that before your  suggestion:

 

Screenshot 2024-08-22 at 18.23.45.pngScreenshot 2024-08-22 at 18.23.09.png

Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 22, 2024

Hey @Fredrik Svärd 

Thanks for the confirmation.

If you are using the correct username and password, then I believe you should try to call your workspace and repository name directly instead of using the variable. 

I also suggest removing the account/repository if you are uploading the artifacts on the same workspace/repository as it will use the default ${BITBUCKET_REPO_OWNER} and ${BITBUCKET_REPO_SLUG}.

Regards,
Syahrul

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events