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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

✖ API request failed with status 401. Check your username and app password and try again.

Hi, I am using the Atlassian pipe: 

https://bitbucket.org/atlassian/bitbucket-upload-file/src/master/

to deploy a python library to our repository downloads.

Following the instruction, I created an App Password and create the corresponding Account Variables so they are accessible for all the repos in our Team account. 

When I run the deployment step:

- step:

     name: Deploy to Downloads script:

        - pipe: atlassian/bitbucket-upload-file:0.1.4

           variables:

                 BITBUCKET_USERNAME: $BITBUCKET_USERNAME

                 BITBUCKET_APP_PASSWORD: $BITBUCKET_APP_PASSWORD

                 FILENAME: 'dist/rabbitmq_wrapper-0.1.0.tar.gz'

I get: ✖ API request failed with status 401. Check your username and app password and try again.

 

In your instructions, it says "If you want to upload a file to a repository owned by a team account, make sure you have the correct access to the repository." Does that mean my personal account? (I am admin), or should I give access to the App Password, and if so, how?

1 answer

1 accepted

0 votes
Answer accepted

Hi @mmromero ,

make sure that you created BITBUCKET_APP_PASSWORD correctly with right permissions:
Repositories write and Repositories read.

Also, check 
that provided BITBUCKET_USERNAME value is your Bitbucket user, not the email.

If you want to upload to the team's repository,  your config might be the next:

- pipe: atlassian/bitbucket-upload-file:0.1.4
variables:
BITBUCKET_USERNAME: 'mmromero'
BITBUCKET_APP_PASSWORD: $BITBUCKET_APP_PASSWORD
FILENAME: 'dist/rabbitmq_wrapper-0.1.0.tar.gz'
ACCOUNT: 'teamaccountname'
REPOSITORY: 'repositoryname'
 

 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Announcing the waitlist for Jira Work Management

Hey there Cloud Community members! We’re excited to give you the first glimpse of the new home for business teams on Jira — Jira Work Management. Jira Work Management is the next generation of J...

642 views 10 16
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you