mercurial - Configure Hg to not ask for user name and password on command line -


when try clone https-authenticated mercurial repository (e.g. kiln), asks me user name

c:\temp\test>hg clone https://<my-login-name>.kilnhg.com/code/repositories/group/test http authorization required realm: kiln user: 

we want invoke hg clone command our gui application url provided user , ask user on demand user name , password, if required.

how can configure mercurial invoke arbitrary script returns user name/password, similar scripts paths defined in environment variables git_askpass or ssh_askpass git?

you can configure credentials in user-wide hgrc (mercurial.ini in user profile directory, on windows):

[auth] foo.prefix = example.com/path foo.username = user foo.password = password 

afterwards, requests server silently use credentials provided in hgrc file.

see docs on hgrc more information.


update: after studying tortoisehg sources little (the code in question being syncwidget.inclicked , syncwidget.pullclicked methods in sync.py), i've found out tortoisehg, precisely you're trying achieve, apparently first tries url auth request, and, if it's been given, asks user login , password, rebuild full url (with credentials) , supply hg pull.

i guess can same.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -