diff --git a/mercurial/httpconnection.py b/mercurial/httpconnection.py --- a/mercurial/httpconnection.py +++ b/mercurial/httpconnection.py @@ -14,6 +14,7 @@ from .i18n import _ from . import ( + pycompat, util, ) @@ -62,6 +63,7 @@ # moved here from url.py to avoid a cycle def readauthforuri(ui, uri, user): + uri = pycompat.bytesurl(uri) # Read configuration groups = {} for key, val in ui.configitems('auth'):