Missed Team ’24? Catch up on announcements here.

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

Can't set app password in SourceTree

lsfinn
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!
June 27, 2022

Just now getting to update SourceTree to use app password to connect to Bitbucket (also first time using app password mechanism).

System & Software: MacOS 12.4; SourceTree 4.1.8 (244)

Followed instructions at <https://bitbucket.org/blog/deprecating-atlassian-account-password-for-bitbucket-api-and-git-activity> to create an app password for SourceTree. Gave this app password permissions Repository (read, write, admin, delete) and Pull Requests (read, write). Saved generated password.

Tried to follow instructions at <https://support.atlassian.com/bitbucket-cloud/docs/add-an-app-password-to-sourcetree-or-another-application/> to add app password to Sourcetree. Proceed through step 4, using app password just generated, and selecting  protocol HTTPS. Upon selecting "Save" I get an alert panel, title "Login Error", with the text "We couldn't connect to Bitbucket with your (lsfinn) credentials. Check your username and try the password again.".

At this point I'm stuck. I've tried again, but to no avail. I've revoked the app password just generated and created a new one, with the same results.

I'm clearly doing something wrong; however, I'm having trouble figuring out what. I'd appreciate any help/advice that the community can provide.

 

1 answer

1 accepted

0 votes
Answer accepted
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 28, 2022

Hello @lsfinn ,

Thank you for reaching out to Atlassian Support.

From the behavior, you have reported it seems that the credentials you are using might be incorrect or lack permissions, so I would like you to confirm the following : 

  • Use your bitbucket username, not the e-mail address, as the username when configuring the sourcetree account. You can check the username of your bitbucket account accessing personal settings: https://bitbucket.org/account/settings/
  • Make sure you are not including any leading/trailing spaces when copying/pasting your App Password and username.
  • Create a new App Passwords checking all the permissions and try using it when configuring Sourcetree.

Could you please try the above suggestion and let us know how it goes?

Thank you, @lsfinn .

Kind regards,

Patrik S

lsfinn
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!
June 28, 2022

That - or, something in that - did it. 

The only thing that I am conscious of doing differently is giving the app all possible permissions. 

From a security perspective is there an appropriate subset for SourceTree? 

Thanks much!

Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 28, 2022

Hey @lsfinn ,

Great to hear that it worked!

It seems like Sourcetree does some calls to bitbucket API as part of validating the credentials provided, and accordingly to my testing, it needs account:read in order to complete that.

So having an app password with account:read and your desired level of other permissions should be enough in this case.

Kind regards,

Patrik S

Suggest an answer

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

Atlassian Community Events