In my attempts to get Sourcetree to not prompt me for a password to bitbucket all the time, I'm now down a rabbit hole where it won't connect to bitbucket at all.
This is Version 2.7 on Mac, connecting to Bitbucket cloud. I authenticate into Bitbuket using my Google credentials.
Sourcetree > Preferences > Accounts > Add ...
* Host: Bitbucket
* Auth Type: Basic
* Username: blah blah (got it from Bitbucket Settings > Account Settings > Username
* Protocol: HTTPS
* Password <- What goes here? I have configured an app password on Bitbucket under Settings > App passwords, and pasted the one generated into this, but I get "We couldn't connect to Bitbucket with your (blah blah) credentials. Check your username and try the password again."
Thanks
(p.s. I've tried SSH also, but couldn;t get that working. Happy to give it another go though)
Solved.
I used the instructions here (article titled "Permanently authenticating with Git repositories") to add credentials to my ~/.netrc file. I couldn't get the osc keychain method to work.
thank you, great solution!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I exactly have the same issue after trying to switch from the account password to an app password.
"We couldn't connect to Bitbucket with your <username> credentials..."
Repository access works in git on the command line, but not in SourceTree.
Is there a fix works in SourceTree, not some workaround?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm having the exact same problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Does anyone have any solutions? I can't find anything online that gives updated instructions for authenticating. What worked in 2018 definitely won't work now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had the same problem back on 1/31/22. I was able to successfully create and use the app password this time.
I suspect the problem was that I hadn't selected the proper permissions for the various features when actually generating the app password. This time I gave everything the maximum privileges like write and admin. I may circle back and refine my choices with a new app password, but everything works fine now, which is great.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had the same issue. I needed to add the Read Account permission when creating the app password to make it work (see below). Before pushing my commits, I also needed to change my repository parameters to use the https url instead of the ssh one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The solution that worked for me was @Antoine Duval , above. The Read permission on Account needed to be checked when create any app password.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I need some help. I am having definitely the same issue as everyone else here. Even when my credentials are very right, pushing my code to bitbucket returns me an authentication error. "fatal: Invalid credentials
remote: Invalid credentials"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The solution that worked for me was @Antoine Duval , above. Create an app password for Sourcetree then use that in the authentication settings in Sourcetree.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Atlassian, PLEASE, are you ever going to fix this issue? It continually prompts for user password when Pushing and Pulling. I enter my password and it will not accept it. Same errors as reported many times. I completely uninstalled SourceTree and reinstalled the latest version. Same thing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am using SSH. I have removed and re-added the key in Bitbucket. I have removed and re-added the account in Source Tree. Nothing that I can do can fix this problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm in the same boat. Any updates on a fix? Not sure why I am getting this error when others on my team aren't?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can try to authenticate using OAuth where you have an option to sign in using email id and password or google account just like you would do on a browser.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the idea, Manjunath -- it accepts the credentials fine in Preferences > Accounts, but still prompts be for a password when I push to bitbucket, and the push fails with a bunch of errors such as:
Pushing to https://***.git
2018-02-09 20:15:41.011 git-credential-sourcetree[8604:4476734] Error generating password due to missing uuid. Please report this to Atlassian.
2018-02-09 20:15:41.013 git-credential-sourcetree[8604:4476736] Something went wrong. one or more parameters required to renew token is nil.
2018-02-09 20:15:45.179 git-credential-sourcetree[8604:4476734] Error generating password due to missing uuid. Please report this to Atlassian.
2018-02-09 20:15:45.179 git-credential-sourcetree[8604:4476734] Password encryption failed - key to to encrypt password is unavailable (nil)
remote: Invalid username or password. If you log in via a third party service you must ensure you have an account password set in your account profile.
fatal: Authentication failed for 'https://***.git/'
So that looks like a fresh hell to explore.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Apologies for the trouble here. This is a new issue that is being reported and I would appreciate if you can use a custom build and give me logs for this one.
https://drive.google.com/file/d/1qM8VRBtr-m_d0lge8Nfs1RtTtBG62JBo/view?usp=sharing
This would help us identify and resolve the issue.
In the meanwhile, you can use ssh to work around these issues. If you have already generated an ssh key and uploaded it to bitbucket, please check if the key is also added to ssh-agent on macOS and add it if not already added by running below commands in terminal.
Check for keys in agent using
ssh-add -l
Add Keys using
ssh-add <path_to_key>
like,
ssh-add ~/.ssh/id_rsa
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This solved my problem. Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.