HTTP auth with user/pwd in URL (fwd)
Peter Meerwald
pmeerw at pmeerw.net
Fri Aug 17 07:07:07 CDT 2007
Hello,
I already posted on mercurial mail list, maybe -devel is more
appropriate...
when giving user/pwd in an URL, eg.
hg pull http://user:pwd@host.com:666/hg/something,
hg would still ask for user/pwd in interactive mode (or fail in
non-interactive)
below is a patch against 0.9.4, same issue with tip;
I'd appreciate if you could apply the patch and comment on the issue
regards, P.
--- mercurial-0.9.4/mercurial/httprepo.py 2007-06-26
04:18:18.000000000 +0200
+++ mercurial-0.9.4-auth/mercurial/httprepo.py 2007-08-14
18:27:26.000000000 +0200
@@ -213,7 +213,7 @@
if user:
ui.debug(_('http auth: user %s, password %s\n') %
(user, passwd and '*' * len(passwd) or 'not set'))
- passmgr.add_password(None, host, user, passwd or '')
+ passmgr.add_password(None, self._url, user, passwd or '')
handlers.extend((urllib2.HTTPBasicAuthHandler(passmgr),
httpdigestauthhandler(passmgr)))
--
Peter Meerwald
Kaigasse 3/8
A-5020 Salzburg / AUSTRIA
+43-664-2444418
More information about the Mercurial-devel
mailing list