我在 Windows Server 2008R2 中使用带有 TortoiseHg(v2.11.1 64 位)的 mercurial 密钥环扩展时遇到了一些无法解释的困难。
该扩展似乎已启用(mercurial_keyring 条目存在于 mercurial.ini 以及 repo hgrc 文件中),并且我已设置默认 repo URL 以传递我的用户帐户(例如' default=http://username@my-host-name/reponame/
')。
我已经从命令提示符进行了手动推送,以将我的密码存储在 Windows 凭据存储中,这似乎可以工作 - 从命令提示符进行的后续推送不请求身份验证。我还可以在 Windows Credential Store 中看到“Mercurial”条目。我已经确认我的 PATH 环境变量只指向 TortoiseHg 安装的 hg.exe 实例。最后,我在 Jenkins 中创建了一个作业,该作业尝试执行提交并推送我进行测试推送以存储我的凭据的同一个 repo。但是,该作业失败并显示以下消息:
16:33:00 c:\_servers\Jenkins>hg push --debug
16:33:12 pushing to http://<username>@<my-host-name>/kiln/Code/<repo path>
16:33:12 using http://<my-host-name>/kiln/Code/<repo path>
16:33:12 http auth: user <username>, password not set
16:33:12 sending capabilities command
16:33:12 query 1; heads
16:33:12 sending batch command
16:33:12 searching for changes
16:33:12 all remote heads known locally
16:33:12 sending branchmap command
16:33:12 sending branchmap command
16:33:12 preparing listkeys for "bookmarks"
16:33:12 sending listkeys command
16:33:12 2 changesets found
16:33:12 list of changesets:
16:33:12 e7131cb8af1d3e64e678861c687d76025d3c639f
16:33:12 7bc85ba011df5c423244e3222efd7ebf6b5f0dd6
16:33:12 bundling: 1/2 changesets (50.00%)
16:33:12 bundling: 2/2 changesets (100.00%)
16:33:12 bundling: 1/2 manifests (50.00%)
16:33:12 bundling: 2/2 manifests (100.00%)
16:33:12 bundling: .hgignore 1/2 files (50.00%)
16:33:12 bundling: <mutated file list> 2/2 files (100.00%)
16:33:12 sending unbundle command
16:33:12 sending 685 bytes
16:33:12 sending: 0 kb
16:33:12 sending: 0 kb
16:33:12 [HgKeyring] Keyring URL: http://<my-host-name>/kiln/Code/<repo path>
16:33:12 [HgKeyring] Looking for password for user <username> and url `http://<my-host-name>/kiln/Code/<repo path>`
16:33:12 [HgKeyring] **Password not present in the keyring**
16:33:12 abort: mercurial_keyring: http authorization required but program used in non-interactive mode
我不确定我做错了什么,或者这不是一个可行的配置,但我当然会很感激任何建议。感谢您的考虑。