You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何为自定义Mercurial端点配置SourceTree凭证,解决UI拉取无响应问题?

SourceTree Mercurial拉取无响应问题解决办法
  • 确认SourceTree使用的Mercurial版本:打开SourceTree的偏好设置(Windows选「选项」),进入「Mercurial」标签页,切换到你命令行能用的独立Mercurial版本,别用嵌入式版本——嵌入式版本大概率没正确读取系统的SSH密钥配置。
  • 配置SSH客户端:在SourceTree的SSH设置里,选择系统默认的OpenSSH客户端(Windows路径一般是C:\Windows\System32\OpenSSH\ssh.exe,Mac是/usr/bin/ssh),别用SourceTree自带的Putty。命令行能正常用id_rsa,是因为用了系统SSH,Putty需要单独转.ppk密钥,容易出问题。
  • 检查Mercurial配置文件:找到用户目录下的.hgrc(Windows是%USERPROFILE%\.hgrc,Mac是~/.hgrc),确保里面有SSH密钥的指定:
    [ui]
    ssh = ssh -i ~/.ssh/id_rsa
    
    保存后重启SourceTree,让它加载这个配置。
  • 清除SourceTree缓存:关掉SourceTree,找到缓存目录(Windows是%LOCALAPPDATA%\Atlassian\SourceTree,Mac是~/Library/Application Support/SourceTree),删除缓存文件后重新打开。
  • 终端测试:在SourceTree内置终端里执行hg pull,如果能正常拉取,说明是UI加载卡住,试试更新SourceTree到最新版本,或者关闭后重新打开。

内容的提问来源于stack exchange,提问作者cwallenpoole

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.12 13:56:04