where for UserName I tried both {Bitbucket User Name} and {Bitbucket Username}@bitbucket.org and for Password I used the App password.
What else can I try to get this working again? All I seem to get downloaded is a generic xml document that is about 7K in size rather than the actual raw file.
That is definitely getting me closer...I am now at least getting an error rather than a dummy file. The error is "The remote server returned an error: (404) Not Found." And when I use the wrong password I also get the familiar and expected error "The remote server returned an error: (401) Unauthorized."
I suspect there must be something else I have to do to the URL to get this working.
Atlassian Team members are employees working across the company in a wide variety of roles.
March 18, 2022 edited
@brunopostle did you check your app password settings to see if the app password you used was accessed at all (app password settings will show you when your password was last accessed/used)? Also, you will still get the error message if you enter your password wrong. Please ensure you have done the following.
read and write (tip: just click write to select both)
Repository
read and write (tip: just click write to select both)
Then click create and make sure you correctly write down/save the provided app password
Create a new repository (follow bitbucket prompts to create a new repo)
clone repo via HTTPS
git clone https://<bitbucket_username>@bitbucket.org/<workspace_name>/<repo_name>.git (note <bitbucket_username>, <workspace_name> and <repo_name> will be different for your repository.
enter this in your terminal
go to the directory of your newly cloned repo (command is: cd dir_name)
Add some stuff to your repo
echo "some stuff" > file.txt
git add .
git commit -m "first commit"
push to Bitbucket cloud remote repo
git push origin master
now your terminal SHOULD ask for your credentials
username: enter your bitbucket cloud username (do not enter your email address; it needs to be your Bitbucket Cloud username)
password: enter your app password created in step 3 above
please ensure you enter app password correctly.
hit enter and it should push to the Bitbucket Cloud repository
This worked for me with no issue. Let me know if you have any issues trying this out please.
@David Dansbythanks I got this to work by creating a new app-password and following these steps. The old password didn't work, though I'm not sure why, possible reasons:
the label included capital letters and hyphens, the working label is lower-case a-z
the previous app-password may not have had write permissions, it is impossible to view or edit existing app-password permissions in the web GUI, so I can't be sure about this either
A couple more comments:
When using a real app-password that doesn't have correct permissions, the authentication failure message still says remote: Bitbucket Cloud recently stopped supporting account passwords for Git authentication [...] This is very misleading as it is reporting an authorisation failure as an authentication failure, leading me to assume the latter
It is possible to create multiple app-passwords with the same label, in conjunction with the inability to view permissions, this is very confusing
since this change I've been unable to use my repositories in bitbucket! its a disaster! I created my app password and saved the provided password in my password manager to be sure its safe, but entering the correct password either via git command line or github desktop app gets authentication failure and its impossible to tell why!? (got no reply from atlassian support after a week either!)
I created app password. I have been using on my local machine fine. But when I am using same app password on remote machines, I get Authentication failed error asking me to create app password.
OK I finally got Xcode working again by creating a new App password and selected Read/Write for Account, Repository and Pull Requests.
Then I also created a SSH Key and added BitBucket account to Xcode - connected using the App password and then selected SSH and the ssh key. HTTPS still fails with some authentication error but as long as I use ssh in Xcode is seems to push changes to the remote repo.
@David Dansby Hi David, as per my comments on March 11th, our issue is that when attempting to download a psm1 powershell files from our repository using the powershell command $webClient.DownloadFile, instead of getting the PSM1 file we are after, we get a file named the same as our PSM1 file, but it doesn't contain powershell script, it contains HTML code for a "Something went wrong" Atlassian page. We are using the bitbucket username (not email) and the app password to do this. One thing to note is that in our credential set up, the username is followed by a ' escape character. I believe the original coder of this script did this due to a hyphen being part of the user name. So the bbcredentials variable I mentioned in my earlier message is set up like this:
This transition was handled rather poorly, especially for Sourcetree users considering both Bitbucket and Sourcetree are owned by Atlassian. Right hand not knowing what the left hand is doing?
Atlassian Team members are employees working across the company in a wide variety of roles.
March 21, 2022 edited
@Manisha Deshmukh can you provide more details. Are you trying to do something different on the remote machines? What is the username you are using on the remote machines (app passwords don't allow using email, they require using the associated Bitbcket Cloud username). Also, did you make sure your priviledge scopes are correct for the app password with regards to what you are trying to use the app password for/to do?
Atlassian Team members are employees working across the company in a wide variety of roles.
March 21, 2022 edited
@hausfux if you provide more details I can try and better assit you. After you create an app password (in your Personal Settings -> app passwords) where are you using your app password? What error message are you getting? Anything else that could determine the issue would be useful as well.
@David Dansby On the remote machine, I am not using credentials cache as its shared by multiple users. I have to enter username/password for git commands like git pull. I have added all permissions to my app password. Same app password works fine with credentials cache on my laptop.
Atlassian Team members are employees working across the company in a wide variety of roles.
March 21, 2022 edited
@Manisha Deshmukh what is the actual error being returned on the remote machine? and to confirm you are correctly entering your username and app password? What privilege scopes are selected for the app password you are using? Also, what is the git remote URL on the remote machine? Does it include an email as the username? Is the username in the git remote URL, and if so, is it the correct username?
@David Dansby Do you know who I need to speak with to get support for why username+app_passwords are not working for bitbucket cloud repo type on bamboo?
I created app passwords for my service accounts and my individual accounts. As a test, the app passwords had full access permissions. These accounts proper access to the repos in question.
I updated the Shared Credentials to use proper username (not email address) and changed the password to the newly created app passwords.
In the Linked Repos, I made sure the proper shared credentials were selected, then clicked "Load Repositories". I will get this error.
Failed to load data from Bitbucket. [403 Forbidden]
I know there was a warning about cached passwords on the agents, so I made sure to clear the git caches, and wait an hour to a day between retries.
I believe there should be an option to enter your credentials without using the Stored Credentials; have you tried this as well? Also have you tried removing and then adding the shared credentials back?
FYI I was unable to get Xcode to work with HTTPS and the App username/password. I was able to connect and then had to selected SSH and not HTTPS to get it to work. Has anyone from Atlassian actually tried using Xcode to verify that their changes are working correctly. Your SourceTree developers will surely have Xcode experience and can test it for you. Alternately I am happy to do the testing in conjunction with Atlassian tech team if someone from Atlassian wants to contact me.
283 comments