TortoiseHg error - [command returned code 255 ...]
I am trying to clone a repository via TortoiseHg.
I take paste the clone line into TortoiseHg
hg clone http://myusername@servername/hglab/hg/myslug/myreponame
and next receive the error message:
repository hg clone http://myusername@servername/hglab/hg/myslug/myreponame not found
[Code: 255]
A few things: When I paste the same line a cmd window, the clone happens as I would expect. no errors, all is well, I can make changes, committ, push them back up, etc...
I next added a .hgrc file as well as mercurial.ini file with [ui] and [auth] sections.
I know the cmd line version is using the .hgrc file because when I remove it, I am asked for a username and then a password.
When .hrgc is back in place in my c:\users\myusername folder then from the command line I leave off the user id.
e.g. with .hgrd in place I can use:
hg clone http://servername/hglab/hg/myslug/myreponame and everything works well.
I added the [auth] stuff to mercurial.ini to see if it made a difference but no good
Not a huge issue, but I'm surprised this hasn't been reported.
FWIW: This is not a public repository
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
1 Posted by pdavidson on Nov 13, 2014 @ 12:01 AM
BTW - what is the difference between .hgrc and mercurial.ini in a windows setting of c:\users\myUsername
Do we need them both?
Are they read sequentially where last read has precedence, ala css files?
Best practice is what?
Support Staff 2 Posted by Anton Gogolev on Nov 13, 2014 @ 09:20 AM
Paul,
You're just pasting the wrong thing and HgLab is a bit confusing here. To clone using TortoiseHg, you only need the URL part, i.e. everything after the
hg clone
substring:Storing passwords in plain-text anywhere is not exactly the best idea. There's an excellent extension called Keyring, which ships with TortoiseHg and which can be enabled from within TortoiseHg Workbench in File - Settings - Extensions by checking the "mercurial_keyring" checkbox.
As for configuration files, they are very much like CSS, with more "specific" files overriding less "specific" ones. Here's a full list:
Settings from earlier paths override later ones.
There's no "best practice" -- everyone picks whatever works in their specific cases. For example, a System Administrator can tweak Mercurial settings (via Group Policy or somesuch) in the Registry, you can enable the extensions you use all the time in
Mercurial.ini
from your%USERPROFILE%
and then you can fine-tune the settings on a per-repository basis.3 Posted by pdavidson on Nov 14, 2014 @ 02:21 AM
Well, I feel stupid. I must have stared at the documentation examples many times and modified that line in TortoiseHg over and over without cluing into the fact that it says Source
Thanks for the keyring hint. I was considering a jump to AD to get around text passwords. Even if we are behind firewalls, bad idea. keyring is trivial to implement and very helpful.
Support Staff 4 Posted by Anton Gogolev on Nov 14, 2014 @ 04:37 PM
Glad I could help!
Anton Gogolev closed this discussion on Nov 14, 2014 @ 04:37 PM.
pdavidson re-opened this discussion on Nov 17, 2014 @ 07:53 AM
5 Posted by pdavidson on Nov 17, 2014 @ 07:53 AM
Anton:
Regarding the per-user level usage of %USERPROFILE%\.hgrc vs %USERPROFILE%\Mercurial.ini
I see the [auth] section that HgLab makes use of, does it matter if that is in mercurial.ini instead of .hgrc?
I guess in other words, does HgLab search mercurial.ini for the [auth] section?
In writing up a quick start for our coders, it would be easier to refer to dealing with just one ini file…
Not a big deal but I am curious.
Thanks
- Paul Davidson
GIS IT Lead
(505) 768-2635 - Desk
(505) 506-5960 - Cell
Support Staff 6 Posted by Anton Gogolev on Nov 28, 2014 @ 09:23 AM
Paul,
The .hgrc in %USERPROFILE% is there to mimic the way Unix/Linux software is
configured (with so-called "dotfiles"), so unless your developers use both
Windows and non-Windows platforms, there's no need to use .hgrc and a
single INI file will do just fine.
HgLab, being a server-side piece of software, can't possibly use any of the
client-side configuration files. It can only use server-side hgrc files
that are repository-specific to configure ACLs. See more here:
https://hglabhq.com/documentation/user-guide/repositories#configuring-access-control
To sum up, on Windows it's preferable to use Mercurial.ini in %USERPROFILE%
to configure global per-user settings.
On Monday, November 17, 2014, pdavidson <
[email blocked]
<javascript:_e(%7B%7D,'cvml','tender2%[email blocked]');>>
wrote:
7 Posted by pdavidson on Nov 28, 2014 @ 06:12 PM
Thanks
I should have caught the server side issue.
Sent from my iPhone
Anton Gogolev closed this discussion on Jan 03, 2015 @ 08:54 AM.
pdavidson re-opened this discussion on Jan 03, 2015 @ 08:55 AM
8 Posted by pdavidson on Jan 03, 2015 @ 08:55 AM
I am out of the office until Jan 5th, 2015
In the meantime, please contact:
Bryan Ngyuen at
[email blocked]
(505) 289-3203
or
Michael Haley at
[email blocked]
(505) 289- 3204
for all of your GIS IT or IR needs.
Thank you
Paul Davidson
9 Posted by pdavidson on Jan 06, 2015 @ 02:06 AM
Anton:
Please delete that re-opened email above and close the discussion again.
I was out of country and had an auto-reply system going which clearly creates issues in this type of forum :-)
Thanks
Anton Gogolev closed this discussion on Jan 06, 2015 @ 04:31 AM.