SourceTree - Mercurial - 身份验证 - 每次都请求用户名和密码?

SourceTree - Mercurial - Authentication - requesting user name and password each time?

我将 SourceTree 与本地 Mercurial 服务器一起使用,问题是 SourceTree 要求在每次操作时进行身份验证。例如,对于一个克隆,它可以输入 10 次 user/pwd ...

不过,我输入user/pwd并勾选了"remember"复选框,它继续询问。

我看到我可以使用 SSH,但我无法访问存储库网页(它是本地服务器)来设置 SSH 密钥。

1 - 我尝试使用选项>身份验证在 SourceTree 中设置一个帐户 使用选项 "Bitbucket server" 并进入我们的服务器 URL。事实上,用这个方法我什至可以输入我的密码,只是失败了!

2 - 通过使用这样的 URL :https://username:password@serverurl

3 - 使用 Windows 凭证管理器!

4 - 我编辑了 .hgrc 文件

有人有想法吗?

我无法解决问题,然后我使用了 TortoiseHG,这个工具有效! 所以,它看起来像是 SourceTree 中的错误!

您也可以切换到 SourceTree 版本 1.6.23,这个就可以了。

Atlassian 社区的

This solution 为我解决了这个问题(为拼写错误和清晰度进行了编辑):

For all who are using SourceTree under Windows OS and Mercurial as Versioning tool and want to get rid of the boring popup asking for your credentials:

  1. Start cmd shell as admin
  2. Change path to where git-credential-manager.exe as been installed (normaly under ~\AppData\Local\Atlassian\SourceTree\git_extras)
  3. Call "git-credential-manager.exe store"
  4. In the next lines fill in:
    protocol=https
    host=code.domain.name
    username=yourLoginName
    password=yourLoginPassword
  5. Press return again for a new empty line. If you don't get any message, everything is okay.