Stash Git 错误“致命:远程错误:需要验证码”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/30904285/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Stash Git error "fatal: remote error: CAPTCHA required"
提问by Nathan Fig
Attempting to pull from my Stash project, using the following commands:
尝试从我的 Stash 项目中提取,使用以下命令:
$ 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.
您的 Stash 账户已被标记为需要验证码才能再次登录。这通常是由于尝试使用错误密码登录的次数过多所致。所需的 CAPTCHA 会阻止您的 SCM 客户端访问 Stash,直到问题得到解决,即使您正确输入了密码。如果您当前是通过浏览器登录 Stash,则可能需要注销然后重新登录以清除 CAPTCHA。
Logging out and back in again does not help. How do I fix this?
注销并重新登录也无济于事。我该如何解决?
采纳答案by Nathan Fig
The problem was a malformed URL: it should be https://[email protected]/scm/~username/project.gitinstead of stash@stash.
问题是 URL 格式错误:它应该是https://[email protected]/scm/~username/project.git而不是 stash@stash。
回答by Ozan Aksoy
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.
验证码警告的另一个常见问题似乎与密码更改有关。一旦您在系统中更改了您进行身份验证的密码,sourcetree 和 eclipse 插件都可能与 bitbucket 上已登录的会话存在密码冲突,从而导致 CAPTCHA 身份验证激活。
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.
解决方案:进入您的 bitbucket 会话,注销并再次登录。如果问题仍然存在,那么您可能需要检查 URL,因为验证码激活会将您引导至另一个方向,而您的 URL 故障用户帐户将一次又一次地引发身份验证失败。
回答by chjortlund
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.
您可能会在浏览器中打开与 BitBucket 的会话,这给人的印象是一切都很好。只需注销并再次登录,登录时您需要解决一个CAPTCHA,然后您就可以开始了。
回答by Sneaky Polar Bear
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.
对我有用的是进入: C:\Users\UserName\AppData\Local\Atlassian\SourceTree 并删除 passwd 文件。Sourcetree 已关闭,我已退出 bitbucket。然后我重新登录到 bitbucket 并解决了验证码。然后当我启动 sourcetree 并进行提取时,我输入了我的密码,一切都很好。
回答by Victor Oliveira
This happened to me. I tried to remove sourcetree password file but didn't worked. I logout and login on bitbucket but didn't worked too. The thing that worked was to go to Panel Control on Windows and Credential Manager, I changed/removed all references to my git repo.
这发生在我身上。我试图删除 sourcetree 密码文件,但没有奏效。我在 bitbucket 上注销并登录,但也没有用。有效的方法是转到 Windows 上的面板控制和凭据管理器,我更改/删除了对我的 git 存储库的所有引用。
回答by brkeyal
In case of stash on macOS, this has worked for me:
如果在 macOS 上存储,这对我有用:
- Close SourceTree
- Open Keychain Access
- Search for "stash", and remove any entries
- Go to stash website, log-out and login again
- Open SourceTree and enter your password
- 关闭源树
- 打开钥匙串访问
- 搜索“stash”,并删除所有条目
- 转到stash网站,注销并再次登录
- 打开 SourceTree 并输入您的密码
回答by javaJavaJava
For SourceTree when getting this error I had to do the following:
对于 SourceTree 收到此错误时,我必须执行以下操作:
- 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.
- 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.
- 在浏览器中转到 Stash/BitBucket 并注销并使用新的密码和验证码登录和验证。一旦通过验证,他们将删除您帐户上的验证码验证要求。
- 如果我回到 SourceTree 并执行拉取或提取操作,我仍然会收到验证失败消息,因为它尝试使用相同的旧存储密码。为了避免使用旧密码,请尝试从 SourceTree 本身打开终端,然后执行 git fetch。它应该询问您的新密码,您可以提供新的密码,然后将其存储。
回答by Scala Enthusiast
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.
我正在注销并再次登录,但没有任何效果。我在使用 SSO(单点登录)的公司土地上登录 Stash。然后,我注销并在浏览器中进行了硬刷新(FireFox 中的 Shift-refresh)。这打开了带有验证码的登录屏幕。
Once that was logged-in I went into SourceTree and deleted my password from Tools > Options > Authentication.
登录后,我进入 SourceTree 并从“工具”>“选项”>“身份验证”中删除了我的密码。
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.
当我再次返回执行拉取请求时,它在弹出窗口中询问我的密码并且从那里运行良好。
回答by jithin cheruthala
In case you are using sourcetree, Go to Tools-->Options--> Authentication and delete Git saved passwords. This solved my issue
如果您使用的是 sourcetree,请转到工具-->选项--> 身份验证并删除 Git 保存的密码。这解决了我的问题