Use the Mountain Lion installer behind a Squid proxy server

When re-installing Mountain Lion from the Recovery Partition, the installer needs to check installation eligibility with Apple’s servers. If your computer needs to access the Internet through a proxy server for whatever reason, the installer won’t pick up on this; it will attempt to make a direct connection, fail, and tell you to contact AppleCare.

As per my earlier hint (10.7: Get the Lion installer to work behind a proxy server), you could simply use the networksetup command in Terminal to get around this. However, as of 10.8 Apple’s software download servers appear to require additional checks to verify machine eligibility which – if you’re behind a squid proxy server – may require additional configuration changes to squid itself in order for it to work. You may therefore need help from your network administrator for that part …

Source: Mac OSX Hints