CAPTCHA Error - Bitbucket works fine in Browser

uvinoch September 12, 2017

git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin
fatal: remote error: CAPTCHA required
Your Bitbucket account has been locked. To unlock it and log in again you must
solve a CAPTCHA. This is typically caused by too many attempts to login with an
incorrect password. The account lock prevents your SCM client from accessing
Bitbucket and its mirrors until it is solved, even if you enter your password
correctly.

If you are currently logged in to Bitbucket via a browser you may need to
logout and then log back in in order to solve the CAPTCHA.

Visit Bitbucket at https://bitbucket.pearson.com for more details.

 

The above mentioned content is the error message, please help me fix this

16 comments

uvinoch September 12, 2017

Source tree is not working to push files into bitbucket, shows the above error message.

niravpatel2002 October 18, 2017

i am having same trouble, did you able to resolve that error??

Prakash Paramasivam September 25, 2019

Clear contents of below files placed in your source tree folder.


<your user path>\AppData\Local\Atlassian\SourceTree\userhost
<your user path>\AppData\Local\Atlassian\SourceTree\passwd


Then restart SourceTree.

Like # people like this
Yi Han April 14, 2020

For the ones who did this but didn't work:

1. Go to Tools - Options - Authentication, delete all accounts there. 

2. Do a pull request.

3. Enter your account name and password in the pop-up window.

Done! 2 new valid accounts will be created automatically.

Like D X likes this
Pascal October 27, 2017

Possible solutions are:

  • Update GIT-version (if using System Git in SourceTree)
  • switch to Embedded GIT Version in SourceTree
studiomerkasrockz November 12, 2019

Better solution is to choose another system for subversion

Samet Tarim June 26, 2018

No Update no switch, close SourceTree, open console (Terminal) and try this one:

git config --global credential.helper osxkeychain

After this start SourceTree again, type your Password for SourceTree and push again ;)

Like # people like this
vmadaan July 2, 2018

I am Windows10 user and even after running the command I am having the same issue,

msedd August 16, 2018

works for me on my MacBook

Aaron Chavarria February 27, 2019

Works for me too. Thx

Casey Trombley April 8, 2019

I tried the command

git config --global credential.helper osxkeychain

however when Sourcetree prompted for password, I typed my password but it still gives the error. I can login to Bitbucket website just fine with same password, never shows me a CAPTCHA - I have never seen the CAPTCHA, this is the error in Sourcetree:

`

fatal: remote error: CAPTCHA required
Your Bitbucket account has been locked. To unlock it and log in again you must
solve a CAPTCHA. This is typically caused by too many attempts to login with an
incorrect password. The account lock prevents your SCM client from accessing
Bitbucket and its mirrors until it is solved, even if you enter your password
correctly.

If you are currently logged in to Bitbucket via a browser you may need to
logout and then log back in in order to solve the CAPTCHA.

Visit Bitbucket at https://git.forge.lmig.com for more details.

`

Like # people like this
samdizon July 23, 2020

Thank you! works for me

zhi wong March 28, 2022

Still doesn't work for me.  I also get the problem from using git purely from the command line.

vmadaan July 5, 2018

I am Windows10 user and even after running the command I am having the same issue,

GraceGuan July 6, 2018

I've the same issue, because i let the system remember my psw,  and after that i change my psw for windows. So it always try to login with my old password and request for CAPTCHA.

Solution:

1. clean your default psw and clean all the history

2. enter the your new password manually for all the related places: wiki,bitbucket

Then you will not be bothered again by CAPTCHA.

Like Arpitha U likes this
Gavin Mills January 8, 2019

Hi, please elaborate. I'm still having issues. I'm using Windows 7. 

I tried deleting all accounts from Source Tree and removing all references from the Windows Credentials manager and logged out of Bitbucket server. I still can't push from SourceTree, if I do I get the CAPTCHA error and then when I login to Bitbucket server a CAPTCHA request is created.

Marc Pieterse January 9, 2019

Hi all,

I had to solve this problem several times already, where I eventually managed to solve it  everytime in a slightly different manner, since the instructions above do not seem to fully solve it for me either.

It also just happend to me again and what I did this time was the following:

Note, that we use CROWD as our primary user directory and there is a synchronization between the two.

1. BITBUCKET: Clear the CAPCHA field for the locked out user.
2. Windows Credential manager: edit the password (probably its still correct here since it did not change).
2. CROWD: remove the "require password change [=true] field" and "invalid password attempts [=4]" field for that user in CROWD (I'm not sure if removing that second field is also relevant, but after spending several times several hours per user on this problem I'm kind done with it).
3. BITBUCKET: "Synchronize now" with the CROWD directory.
4. GIT/SourceTree: try to "fetch" from the repo again.

This is actually the first time that my connection issues were instantly resolved.

Hope it helps you and others too!

Ryan Held January 23, 2019

I had this issue on my MacBook and figured out how to solve it. Somewhere in the OS where SourceTree was supposed to keep my bitbucket password, it was actually keeping the hash to the password. So any time I would push or pull or do anything that requires a password, SourceTree would try the wrong password until it prompted a "CAPCHA required". I just had to find where in the OS it was keeping that hash and change it to my password.

Samet Tarim January 23, 2019

Click on the link in your error message and enter your captcha there, as soon as you have updated the captcha it should run. As far as I can remember it was like that, hope could help you.

Tintu Shaji
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 12, 2019

I resolved this issue by opening the server on in-private window.

Like # people like this
Casey Trombley April 8, 2019

I tried the command:

git config --global credential.helper osxkeychain

however when Sourcetree prompted for password, I typed my password but it still gives the error. I can login to Bitbucket website just fine with same password, never shows me a CAPTCHA - I have never seen the CAPTCHA, this is the error in Sourcetree:

`

fatal: remote error: CAPTCHA required
Your Bitbucket account has been locked. To unlock it and log in again you must
solve a CAPTCHA. This is typically caused by too many attempts to login with an
incorrect password. The account lock prevents your SCM client from accessing
Bitbucket and its mirrors until it is solved, even if you enter your password
correctly.

If you are currently logged in to Bitbucket via a browser you may need to
logout and then log back in in order to solve the CAPTCHA.

Visit Bitbucket at https://git.forge.lmig.com for more details.

`

 

When I go to that link and log out / login I never see the CAPTCHA at all. I have been trying for days to get my access back, tried deleting old keychains and rebooting. I have logged out and back in dozens of times, I have run out of ideas. Any help? Thanks in advance.

zhi wong March 28, 2022

you have to log out of bitbucket and log back in to see the captcha

Mark May 29, 2019

Super frustrating and just to help anyone else struggling with this, this is what worked for me on Windows 10:

  1. Go to the bitbucket server/account and log out.
  2. Log in and solve captcha.
  3. In sourcetree go to the menu Tools/Options and choose 'Authentication'
  4. Select your account - there could be several and then enter you password.

 

I hope it works like it did for me.

Like Paul Kern likes this
Paul Kern August 2, 2019

This solved the problem for me, looks like

  1. The GIT Credential Manager for Windows had an old password, and that was being used in the GIT Bash Here command-line.
  2. GIT command-line is not capable of presenting the Captcha UI, though interestingly enough it was able to show the popup later for entering the password in GIT Credential Manager for Windows.

Read on for the sequence in more detail that led up to the issue, and detail steps to resolve it:

  1. In Chrome, logged into JIRA then switched to Bitbucket using the menu
  2. Compared my branch to the main branch, submitted Pull Request from main branch to my branch. That was approved 5 minutes later
  3. NT Explorer, navigate to C:\GITCode\[my project]\Develop\projects, where I see the .git folder. Right-click | Git Bash Here
  4. git status, and I see my branch has no files needing to be stage, so I then tried a git pull and received the CAPTCHA fatal error.
On branch PK_develop

Your branch is up to date with 'origin/PK_develop'.

Changes not staged for commit:

  (use "git add <file>..." to update what will be committed)

  (use "git checkout -- <file>..." to discard changes in working directory)

...

no changes added to commit (use "git add" and/or "git commit -a")

And the solution:

  1. Back in Chrome Bitbucket, click on the top-right icon of a person (the tool top says 'Logged in as ... ") | Logout
  2. Click that again and Login. After entering password the window changes to also request entering CAPTCHA, so do that.
  3. Close and re-open Git Bash Bash command line window (see step 3 above)
  4. git status followed by git pull will now provide graphical popup for GIT Credential Manager for Windows. Enter your password to get rid of the old saved password, and you should now see the git pull completes successfully.
$ git pull
remote: Counting objects: 24, done.
remote: Compressing objects: 100% (21/21), done.
remote: Total 24 (delta 12), reused 0 (delta 0)
Unpacking objects: 100% (24/24), done.
From https://git.[mycompany].com:8443/scm/[myProject]/projects
ce7892e..946e8f5 [myColleague]_develop -> origin/[myColleague]_develop
4125e64..e6277aa develop -> origin/develop
d209efe..551ffac featureABC -> origin/featureABC
Already up to date.

[myLANID]@[myMachine] MINGW64 /c/GITCode/[myProject]/Develop/projects (PK_develop)
Like Fuad Wiratama likes this
hell_yeah July 10, 2019

I use Ubuntu 18.04, git GUI is GitKraken v6 and company uses proxy. The issue is the same, what most described with SourceTree. Any suggestion above did not work for me.

The CAPTCHA problem started after changing domain password.

With browser i will logged in automatically with domain credentials if i go to web interface. Also i git commands work in terminal and Intellij git plugin works fine. CAPTCHA issue appears only with GitKraken.

 

UPDATE:

Seem's that AD pwd change does not match somehow with Bitbucket. For me was the workaround to clone repo over ssh and everything works fine.

If i clone over https, then i still have this issue. For SourceTree seems the issue similar, but keywords for solution in google is "How to update HTTP(S) credentials in sourcetree" or "how do i update the password for git linux"

Mauricio Giacomello August 19, 2019

Cloning the repos with SSH instead of HTTPS solved my problem. I have my ssh key added to my account.

Like # people like this
Prakash Paramasivam September 25, 2019

Clear contents of below files placed in your source tree folder.


{your user path}\AppData\Local\Atlassian\SourceTree\userhost
{your user path}\AppData\Local\Atlassian\SourceTree\passwd


Then restart SourceTree.

rburchell October 31, 2019

Hi, I was getting the same error messages too. I found out that my OSX Keychain was storing my source tree password as just '1'. After updating it to the actual password it works fine.

studiomerkasrockz November 12, 2019

I just gave up working with this piece of software. Its too frustrating. There are better solutions available

Like # people like this
Dahal, Prakash [JJCUS NON-J&J] February 20, 2023

For me, the error solved with this answer, https://stackoverflow.com/a/75938167/13573168

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events