Tortoise Hg integration
Hello,
Sorry for being a total noob.
I am not sure whether I can configure Hglab to use windows authentication without the LDAP plugin. The network admin confirmed to me that we are not using LDAP; but just the AD Authentication (I am not a networking guy. So not sure what it means).
What I really want is to do is to use Tortoise Hg as the client and disable the authentication prompt every time when someone tries to do a push either by storing the password somewhere or disabling the login entirely. Is it something that I can do?
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Anton Gogolev on 30 Oct, 2013 06:29 AM
Hi, Sujith!
Active Directory is essentially an LDAP server and these terms
can generally be used interchangeably. With that in mind, you can add a
Catalog that connects to your Active Directory Domain Controller so that
you'll be authenticating in HgLab with your domain credentials.
Now, there's a catch. Mercurial itself does not support Windows
authentication, which means you must enter your password every time you do
"push" to the server. To solve this, you'll have to enable
"mercurial_keyring" extension in TortoiseHg Workbench - File - Settings -
Global Settings tab - Extensions pane. This will securely keep your
password in your Local User area and you'll not have to type it manually
every time.
2 Posted by Sujith Gokulada... on 30 Oct, 2013 06:58 AM
Thank you for the detailed answer. I will try that tomorrow. Also, could you please tell me how to integrate Hglab with Jenkins? We have to do an automated check in after every release build and mercurial plugin for Jenkins will not support http authentication.
Support Staff 3 Posted by Anton Gogolev on 30 Oct, 2013 07:18 AM
Anytime!
I never tried Jenkins, but there are two options that may work fro you.
First, you can try "embedding" login and password directly in the URL (
http://login:[email blocked]/url
), but Internets say that Jenkins may want to re-clone the repository each and every time (this might have been fixed already, don't really know).Second option is a bit more complicated. You need to go to
C:\Users\<name-of-the-user-that-Jenkins-windows-service-is-running-under>
and create a file called.hgrc
(note the leading dot) with the following contents:Note that
hglab.prefix
should contain the URL of your HgLab installation up to the/hg
segment, not deeper (that is, it should not include neither project slug nor repository name). Andusername
andpassword
are these of the Jenkins user in HgLab.Hope this helps. Let me know how things work out for you.
4 Posted by Sujith on 31 Oct, 2013 10:28 PM
Thanks. That worked. But when I try to clone a specific branch, I am getting an error.
I am migrating my hg repo to another server. So I have configured hglab in the new server, created projects. I am unable to do hg push <new url> to the new server for the first time since my repo is around 4GB. So I have logged into the new server, replaced the .hg folder in the newly created repo with the .hg folder in the old one. Now I can see all the history and branches using hglab. But when I try to pull a specific branch, I am getting the below error. I am using this command because this is what jenkins will use internally to pull a branch
D:\Jenkins\jobs\x64>hg clone --rev somebranch --noupdate http://user:password@server:8001/hg/testproject/test D:\Jenkins\jobs\x64\workspace --debug
using http://server:8001/hg/testproject/test
http auth: user user, password *******
sending capabilities command
sending lookup command
abort: unknown revision 'somebranch'!
Support Staff 5 Posted by Anton Gogolev on 01 Nov, 2013 07:26 AM
Sujith,
4 Gb is well over recommended limits for Mercurial. It does support
large repositories, but working with them is really cumbersome. Plus,
HgLab doesn't handle extremely large pushes very well -- primarily due
to IIS restrictions.
The `hg clone --rev` command should actually work. Could you please
ensure that the branch you're trying to clone actually exists on the
server (with matching case). There's also `hg clone --branch` option,
which explicitly clones only specified _branch_, not an arbitrary
revision.
6 Posted by Sujith Gokulada... on 01 Nov, 2013 07:34 AM
Hello Anton,
Yes. The branch exists. I am unable to clone with any branch; even with the default one. At the same time, I can do hg clone without specifying any branch and the do an hg update -C <branch name>. It is very strange...
Support Staff 7 Posted by Anton Gogolev on 01 Nov, 2013 07:38 AM
Sujith,
Then we'll need to investigate logs. Take a look inside
App_Data
in the folder where HgLab is installed (_not_ the home directory). If there are no.txt
files in there, run the following command in an Elevated command prompt:Then try
hg clone --rev
once more and attach the log over here.Thanks!
8 Posted by Sujith Gokulada... on 01 Nov, 2013 07:42 AM
You are being very helpful. Appreciate that... I'll try that on Monday. I can't connect to work from home
9 Posted by Sujith Gokulada... on 03 Nov, 2013 10:22 PM
I have setup hg web and using the same repository via both the front ends. I have run the same command using both the URLs and attached the responses. The commands can be found in the log file itself
Support Staff 10 Posted by Anton Gogolev on 04 Nov, 2013 05:36 AM
Sujith,
Thanks! I've identified the issue and will issue a fix later today. Thanks again for the cooperation.
On 04.11.2013, at 2:22, "Sujith Gokuladas" <[email blocked]> wrote:
Support Staff 11 Posted by Anton Gogolev on 04 Nov, 2013 09:46 PM
Sujith,
My apologies. The fix is delayed a bit.
On Monday, November 4, 2013, Anton Gogolev wrote:
Support Staff 12 Posted by Anton Gogolev on 05 Nov, 2013 01:19 PM
Sujith,
Again, sorry for the delay. A fix is available over here: http://hglabhq.com/download/0.4.6
13 Posted by Sujith Gokulada... on 05 Nov, 2013 08:48 PM
Anton,
Not a problem. I was away because of the Melbourne cup yesterday. Thanks for the fix. I will try that now
14 Posted by Sujith Gokulada... on 05 Nov, 2013 10:03 PM
Hello Anton,
I am sorry, but that fix is still not working for me. Please find the error message and log file attached:
adding changesets
adding manifests
transaction abort!
rollback completed
abort: 00manifest.i@57e28636b27f: unknown parent!
Support Staff 15 Posted by Anton Gogolev on 06 Nov, 2013 04:22 AM
Sujith,
Oh well. Now that you're hitting the longest-standing bug in HgSharp (sic) there is an incentive for me to actually fix it.
The problem here is that there are some edge-cades when HgSharp doesn't handle "subgraph" clones/pulls particularly well. As a workaround you can try cloning/pulling the entire repository (that is, without "--rev" or "--branch" arguments) (with an added benefit of using an "--uncompressed" option), but I'm not sure if Jenkins supports this use-case.
In any case, apologies for the inconvenience. Will try to resolve this ASAP.
On 06.11.2013, at 2:04, "Sujith Gokuladas" <[email blocked]> wrote:
16 Posted by Sujith Gokulada... on 06 Nov, 2013 09:24 PM
Hi Anton,
Not a problem. I do have an interim solution in place. And BTW, the solution that you have suggested will not work with Jenkins
Anton Gogolev closed this discussion on 28 Jun, 2014 01:08 PM.