0

1

Following up to Tyler's answer to the question Kiln Auth with multiple accounts, different user name, I notice that when I run hg logout, it will prompt me to log in again, but the username is already filled in for me. What do I need to do so that I am forced to enter my username as well as my password?

flag

1 Answer

3

This is not a part of KilnAuth. KilnAuth only knows about cookies, it doesn't actually record your username or password. Instead it is just a setting in your Mercurial.ini file. If you open it up, you should see an [auth] section. This is where you can provide a username and (if you wish) password for Mercurial to use.

Mine looks something like this:

[auth]
local.prefix=http://localhost/FogBugz/Kiln
local.username=Tyler
local.password=somepasswordidontcareabout
kiln.prefix=http://example.kilnhg.com
kiln.username=tghw@example.com
tghw.prefix=http://tghw.kilnhg.com
tghw.username=tghw@home.example.com

Mercurial will use whatever values you provide. Note that the first part of the key (such as local, kiln, or tghw) can be whatever you want it to be. .prefix tells Mercurial what URLs to use that auth information with. username and password are self-explanatory. Note that if you do put your password into your Mercurial.ini file, it'll be stored in plaintext (which is why we made KilnAuth in the first place).

link|flag
So if I wanted to have a different username per repository, could I just modify each repo's hgrc file? – Ben McCormack Mar 17 2011 at 13:06
Yes, but only if they're on the same server. If they're on different servers, then it won't matter. – Tyler Hicks-Wright Mar 21 2011 at 2:57

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.