2014-03-05 42 views
1

我在使用Mercurial keyring擴展與Windows Server 2008R2中的TortoiseHg(v2.11.1 64位)時遇到了一些無法解釋的困難。無法在Windows中使用mercurial_keyring擴展,TortoiseHg和Kiln執行hg推送

擴展似乎已啓用(mercurial_keyring條目存在於mercurial.ini以及repo hgrc文件中),並且我設置了默認的repo URL來傳遞我的用戶帳戶(例如'default=http://[email protected]/reponame/')。
我已經從命令提示符手動推送將我的密碼存儲在Windows憑據存儲區中,該憑據存儲區似乎正常工作 - 後續從命令提示符推入時不請求身份驗證。我還可以在Windows Credential Store中看到'Mercurial'條目。 我已經確認我的PATH環境變量指向只有到由TortoiseHg安裝的hg.exe實例。 最後,我在Jenkins中創建了一個工作,試圖執行一次提交併推送相同的存儲庫,我做了我的測試,以存儲我的憑據。這項工作,但是,失敗,出現以下消息:

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 

我不知道我做錯了,或者這僅僅是不是一個可行的配置,但我一定會感激的任何建議。感謝您的考慮。

回答

0

您需要手動推送作爲Jenkins在下運行的用戶帳戶,以便將密碼存儲在Windows用戶的密鑰環中。