Stash Git error "fatal: remote error: CAPTCHA required"
Asked Answered
M

20

42

Attempting to pull from my Stash project, using the following commands:

$ git remote add origin https://[email protected]/scm/~username/project.git
$ git pull origin develop

I'm prompted for my password, which I enter and then get the following error:

Your Stash account has been marked as requiring a CAPTCHA to be solved before you may login again. This is typically caused by too many attempts to login with an incorrect password. The required CAPTCHA prevents your SCM client from accessing Stash until it is solved, even if you enter your password correctly. If you are currently logged in to Stash via a browser you may need to logout and then log back in in order to clear the CAPTCHA.

Logging out and back in again does not help. How do I fix this?

Monomania answered 17/6, 2015 at 23:44 Comment(0)
L
28

You might have a session to BitBucket open in a browser, that gives the impression that everything is fine. Simply logout and in again, when logging in you need to solve a CAPTCHA, after that you are good to go.

Lucania answered 30/8, 2017 at 9:22 Comment(3)
doesnt work for meGladsome
No captcha for me after logging out and in again.Beanery
It's not working for bitbucket enterprise.Project
P
19

Another common issue with captcha warning seems to relate with password changes. Once your password is changed in the system you are authenticated with, both sourcetree and eclipse plug-in might have password conflict with the already logged in session on bitbucket, causing CAPTCHA authentication to activate.

Solution: Enter to your bitbucket session, logout and login again. If issue persist, then you might want to check the URL, since captcha activation would direct you to another direction and your user account with malfunctioning URL will raise authentication failures again and again.

Parasite answered 15/8, 2016 at 7:14 Comment(1)
I am having similar issue after updating the password. But even if I re-login with GITHUB(No BitBucket) account, I am facing same issue. is there anything I am missing?Deuterogamy
Y
18

This happened to me. I tried to remove sourcetree password file but it didn't work. I logged out and logged in on bitbucket but it didn't work either. The thing that worked was to go to Control Panel on Windows and Credential Manager to change/remove all references to my git repo.

Yonatan answered 25/4, 2018 at 9:2 Comment(2)
I have this same issue, but not seeing any git references in my credential manager. I only saw a few microsoft office references...Gangway
Thank you. I don't want to remove the references because mine is a company laptop. So I just changed updated the password to Bit Bucket. Actually I've done that before, but just forget totally. Thanks for reminding me.Infiltrate
L
15

What worked for me was to go into: C:\Users\UserName\AppData\Local\Atlassian\SourceTree and delete the passwd file. Sourcetree was closed and I was logged out of bitbucket. I then logged back into bitbucket and solved the captcha. Then when I launched sourcetree and did a fetch I entered my password and all was well.

Letourneau answered 6/10, 2017 at 17:35 Comment(6)
Thanks, the only solution that works for me every time I change passwordMagneton
Where can I find this file on Mac?Hippie
Not a mac user but apple.stackexchange.com/questions/28928/… I would look in (~/Library/Application Support) Let me know if this works and I will add it to the answerLetourneau
where is the passwd file?Endor
It should be in that folder location, unless you have never entered the password dialogue for sourcetree (ie you just installed and have not started it up yet)Letourneau
Sourcetree is such a POS. This is the only solution that worked for me.Swashbuckler
D
10

In case of stash on macOS, this has worked for me:

  1. Close SourceTree
  2. Open Keychain Access
  3. Search for "stash", and remove any entries
  4. Go to stash website, log-out and login again
  5. Open SourceTree and enter your password
Demicanton answered 24/6, 2018 at 15:24 Comment(0)
G
8

I was facing the same issue after changing my Windows domain password. The following steps solved it for me:

  • Close all clients (e. g. terminals, IDEs, browsers)
  • Open Windows Credential Manager (enter "Credential Manager" into Windows search) and delete all entries under Windows Credentials related to the BitBucket instance
  • Open browser instance without login information (e. g. Chrome incognito or Firefox private window)
  • Navigate to https://<<your BitBucket>>/login?auth_fallback, login and solve the CAPTCHA

Now when executing git pull origin, the credential manager popped up, I could enter my new/current password and voila 👍🏻

As a user of JetBrains Rider, I had to clear all stored passwords within Rider (see here).

Gris answered 29/6, 2021 at 9:46 Comment(0)
M
3

My problem was a malformed URL: it should be https://[email protected]/scm/~username/project.git instead of stash@stash.

Monomania answered 17/6, 2015 at 23:45 Comment(0)
M
3

In case of Windows, this worked for me:

  1. Go to Windows search
  2. Type and Open Credential Manager
  3. Then Windows Credential Manager
  4. Delete your bitbucket/github account
  5. Run command you want(pull, push etc.)
  6. It asks to you your credentials for bucket or github account
  7. Enter them properly
  8. That's all!
Multinational answered 15/1, 2021 at 6:30 Comment(0)
E
3

In my case, our organisation using a Bitbucket Server, and an SSO credentials. I logged out to the website, and instead of using the SSO button to login, I had to put my credentials in order to get the CAPTCHA needed to solve this issue.

Estimate answered 1/9, 2021 at 3:45 Comment(1)
I don't see why this answer got downvoted. This is one of the 50 things you will need to try. And if you are in an organization that uses SSO, and also forces you to update your password regularly, this answer is the one you need.Disinfectant
T
2

Go to your Windows >> type credential manager >> windows credential >> update password under bitbucket link

Logout and login in bitbucket

Taggart answered 31/10, 2020 at 0:55 Comment(0)
J
1

For SourceTree when getting this error I had to do the following:

  1. In a browser Go to Stash/BitBucket and logout and login and validate using your new pwd and captcha. Once validated they would remove the captcha validation requirement on your account.
  2. If I come back to SourceTree and do a pull or fetch I still get the validation failed message since it tries to use same old stored password. In order to avoid using the old password try opening a Terminal from SourceTree itself and then do git fetch. It should ask for your new password and you can provide the new pwd which then gets stored.
Jubal answered 4/9, 2018 at 19:57 Comment(0)
S
1

All of the solution didn't work. Finally, I found the answer!
In my devops workplace, there is a self server and I can clean bitbucket CAPTCHA.

PS:

  • The url of my bitbucket is: https://git_adrress/bitbucket/dashboard
  • The url of my devops workplace is: https://git_adrress/#/console
Speller answered 22/2, 2022 at 14:19 Comment(0)
C
0

I was doing this log-out and log in again but it had no effect. I am on a corporate land with SSO (Single Sign-on) to log in to Stash. Then, I logged out and then did a hard refresh in my browser (Shift-refresh in FireFox). This brought up the login-screen with the captcha.

Once that was logged-in I went into SourceTree and deleted my password from Tools > Options > Authentication.

When I went back to do the pull request again it asked me in a pop-up for my password and worked well from there.

Conferee answered 18/9, 2018 at 9:49 Comment(0)
O
0

In case you are using sourcetree, Go to Tools-->Options--> Authentication and delete Git saved passwords. This solved my issue

Opuscule answered 14/10, 2019 at 21:33 Comment(0)
V
0

Sometimes SourceTree in Windows gets hosed when you change your password and causes you to get locked out of your "Stash" Bitbucket Server instance pending login with CAPTCHA.

Here are the steps that worked for me...

  1. Close SourceTree and ALL Visual Studio instances
  2. Search for "Credentials Manager" in Windows then remove all credentials related to git
  3. Remove the SourceTree passwd file found at C:\Users%USERNAME%\AppData\Local\Atlassian\SourceTree
  4. Wait 10 minutes then log in and do the CAPTCHA dance: https://(mybitbucketserver)/login?nextUrl=%2Fdashboard
  5. If CAPTCHA keeps saying you entered the wrong password after a few tries, go to step 4.
  6. Once logged in, open SourceTree and try to pull one of your repos. This should prompt you for your credentials.
  7. If it fails again, go to Tools/Options/Updates and Check For Updates
  8. If SourceTree is up-to-date, go to Tools/Options/Git and update your Embedded Git or System Git (whichever you are using)
  9. Go to step 1
Vodka answered 11/3, 2021 at 19:14 Comment(0)
H
0

If you are facing the issue with Bitbucket on macOS:

  • Close SourceTree
  • Open Keychain Access
  • Search for "bitbucket", and remove any entries
  • Go to stash website, log-out and login again
  • OR Open terminal and apply git pull command
  • Then enter your credentials.
Heritage answered 8/11, 2022 at 21:59 Comment(0)
R
0

For those who is having SSO , you cannot get the Login page

So, to get the Login page try below address and login with capche

https://your.bitbucketserveraddress.com/stash/login?auth_fallback

Rehearsal answered 10/11, 2022 at 7:40 Comment(2)
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From ReviewEsker
I tried but It's redirected a 404 page.Project
M
0

Open the chrome in incognito mode and go to this URL:

https://<<Your BitBucket Domain>>/login?auth_fallback

Be sure you typed your correct bitbucket address in the above link.

Fill the credentials and it will ask to solve the captcha. Solve it and the issue is solved.

Monarchal answered 5/4, 2023 at 10:10 Comment(0)
S
0

if bitbucket is having SSO and once you change your sso credentials then it may happen. It's because of stale git/bitbucket credentials in windows credentials manager.

Captcha confirmation is required only after 100 unsuccessful login attempts. Please check for any other saved passwords that is causing multiple unsuccessful login attempts.

Solution:

  1. Update git credentials in windows credential manager. close it.
  2. Please open git/bitbucket URL in incognito mode to clear captcha on your own. Your typical URL should be like "https://git.*******.com/login?auth_fallback"

Enjoy the day!!

Sulphurate answered 24/8, 2023 at 14:33 Comment(0)
C
0

I am a Mac user and faced the same issue the steps below worked for me.

  1. Go to "Acccounts" of your sourcetree and remove the user facing the issue.
  2. Terminate sourcetree on your system and clear user credentials from Keychain access.
  3. Move to bitbucket from your browser and then logout(if already logged in) and then not proceed with SSO but login by entering your credentials and it will ask you to enter CAPTCHA to proceed ahead. perform the same and move to your bitbucket dashboard.

Note: Before performing step 4 disconnect from your client VPN as it might not allow you to connect user with OAuth. 4. Now open sourcetree, move to "Accounts" and add user again(removed in step 1) with OAuth and HTTPS preferably.

You can add user via "Basic" as well here by entering your credentials manually.

  1. Perform push and pull and have a test.
Ciceronian answered 31/1 at 6:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.