Mac OS X 10.5 and hg clone abort: error: Operation timed out

Chris Leonello cleonello at yahoo.com
Thu Sep 4 15:51:35 CDT 2008


I am a noob to hg and spent many hours figuring this problem out.  I couldn't
find anything on the mailing lists or google.  Maybe this will help someone
else.

This is a Python urllib issue, but affects hg operation if you are on OS X
10.5 and have internet config settings still lingering in your system,
probably from an upgrade from 10.4.

On Mac OS 10.5.4 with python 2.5.2 and Mercurial 1.0.2 (python and hg from
Macports), I was receiving an "abort: error: Operation timed out" error
whenever trying to clone a remote repository.  Turns out that, on Mac OS X,
Python's urllib will read http_proxy setting not only from the environment
but also from the internetconfig defaults. So, even though I had no
http_proxy in any of my hg configuration files, bash config files, or
environment variables, urllib was pulling an old proxy setting from
internetconfig and not allowing any network access.  10.5 seems to have done
away with internetconfig, so I had no obvious way to unset the proxy or even
know it was set.

The solution was to do a "defaults delete com.apple.internetconfig".  I
believe internet config is no longer used, but **this may not be safe**.  A
safer approach would be to write out the defaults to a .plist file, set the
"UseHTTPProxy" key to "0", and read the defaults back in.  Note, the keys
are nested, so I couldn't get a "simple defaults write UseHTTPProxy 0" to
work.

Urllib.py has been patched to use the SystemConfiguration framework instead
of internetconfig (looks like r63159) but this was after Python 2.5.2 was
released.
-- 
View this message in context: http://www.nabble.com/Mac-OS-X-10.5-and-hg-clone-abort%3A-error%3A-Operation-timed-out-tp19319720p19319720.html
Sent from the Mercurial mailing list archive at Nabble.com.



More information about the Mercurial mailing list