When trying to connect through a proxy server TortoiseHg for Windows says "SSL error: unknown protocol"
Asked Answered
L

2

9

The scenario:

You're behind a proxy server on Windows. You've configured TortoiseHg to use a proxy server; that is you've entered a server name/IP and port number. You are able to connect to the internet using Internet Explorer. But when you try to pull or push and it produces the error message "SSL error: unknown protocol".

(I plan to answer this myself.)

Leeuwenhoek answered 17/11, 2011 at 3:40 Comment(1)
Assuming that the web browser has been configured to get past the proxy, you could try the 'hack' I figured out. #11449633Dieppe
L
6

The cause is that Internet Explorer is using an automatic proxy configuration script and TortoiseHg is using a particular proxy server. IE is not using the same proxy server because the automatic script picked a different proxy server.

The solution is to enter the proxy server used by TortoiseHg in IE's connection settings, or figure out which proxy server you're using at the moment and tell TortoiseHg to use that one. You may need to browse an external web site before TortoiseHg can connect.

You can figure out which proxy server you're using by browsing with IE and then running the DOS command:

netstat

and you'll see some connections in the Foreign Address column on port 80 or 8080 (common proxy server ports).

Leeuwenhoek answered 17/11, 2011 at 3:48 Comment(4)
Steps seem simple enough by didn't work for me on Windows 7 behind a NTLM proxy.Grenadine
This simple command let me FINALLY clone projects through my proxy at work! I didn't have the same issue, I actually just had the problem that Hg was not even trying to use a proxy at all, but I didn't know how to figure out what proxy was actually being used. Just entering the proxy name and port from netstat in my Hg config let me clone. Thanks!Comedietta
@James where does TortoiseHg hold the proxy?Palacio
@toasteez In TortoiseHg Workbench, go to File, Settings. On the Proxy page it goes in the Host line.Leeuwenhoek
M
0

In addition to your excellent tip, I offer one more...

If your company is using an automatic proxy script, then the proxy used for web browsing may not be the one you need for Mercurial. Thus if you try the proxy you find via netstat, and you get "getaddrinfo failed" errors in tortoise, then try this...

  1. Get the proxy script address: IE->config->Internet Options->Connection->LAN ?Settings. Copy the url from the "Address" box.
  2. Browse to that address and save the file to disk.
  3. Open that file in notepad and scroll to the end, it probably ends with something like-- return "PROXY ipaddresshere:port" that's the IP and port you need.
  4. Plug that IP and port into tortoise: right-click the repo, click settings, click proxy, put the ip and port into the Host field. I generally don't need user and password so try without it first.
Morvin answered 23/7, 2020 at 20:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.