1

Short summary - I'm setting the git proxy on my Windows 7 machine to point to a locally running proxy application. When I stop running the application (validated with a telnet test) the git clone command hangs instead of identifying a closed socket. I can't reproduce this on a Mac.

My question is: Why does the Git proxy on windows fail to timeout? Is this a bug or by design?

Here are the steps I do (on a Mac) to confirm I can't reproduce the issue on a Mac.

MacBook-Pro:~ $ telnet localhost 1234
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host
MacBook-Pro:~ $ git config --global http.proxy http://localhost:1234
MacBook-Pro:~ $ git clone https://github.com/HaskVan/HaskellKoans
Cloning into 'HaskellKoans'...
fatal: unable to access 'https://github.com/HaskVan/HaskellKoans/': Failed to connect to localhost port 1234: Connection refused
MacBook-Pro:~ $ git config --global --unset http.proxy

The equivalent sequence on my PC is:

c:\temp>telnet localhost 1234
Connecting To localhost...Could not open connection to the host, on port 1234: C
onnect failed

c:\temp>git config --global http.proxy http://localhost:1234

c:\temp>git clone https://github.com/HaskVan/HaskellKoans
Cloning into 'HaskellKoans'...
^C
c:\temp>git config --global --unset http.proxy

c:\temp>git clone https://github.com/HaskVan/HaskellKoans
fatal: destination path 'HaskellKoans' already exists and is not an empty direct
ory.

c:\temp>git clone https://github.com/HaskVan/HaskellKoans
Cloning into 'HaskellKoans'...
remote: Counting objects: 205, done.
Rremote: Total 205 (delta 0), reused 0 (delta 0)eceiving objects:  38% (78/205)
Receiving objects:          205)
Receiving objects: 100% (205/205), 26.27 KiB | 0 bytes/s, done.
Resolving deltas: 100% (114/114), done.
Checking connectivity... done.

Note in particular the ^C (CTRL-C) after the timeout. This is what this question is about.

The version I'm running on Windows is:

c:\temp>git --version
git version 1.9.0.msysgit.0

The version I'm running on my Mac is:

MacBook-Pro:~ $ git --version
git version 1.9.3 (Apple Git-50)
hawkeye
  • 34,745
  • 30
  • 150
  • 304

1 Answers1

0

I have seen that at work behind a proxy with msysgit: the very first git call hangs out, the second one pass.

In your case, if you want to avoid proxy for GitHub access, you have the choice and:

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks VonC - you're a Guru on all things Windows/Continuous integration related. I've much appreciated your clearcase wisdom in the past. In your view - given the inconsistent behaviour between Windows and OS-X - is this a bug? (ie Mac identifies closed port like telnet - Windows doesn't) – hawkeye Nov 08 '14 at 08:20
  • @hawkeye I suspect a bug indeed. git for windows is being revamped, with msysgit being phased out: http://stackoverflow.com/a/3144417/6309. I would try the next "git for windows" (http://git-for-windows.github.io/) 2.1.2, to see if the issue persists. – VonC Nov 08 '14 at 08:32