threads / discuss / 47676

Problem with git and proxy server with authentication

Subject: Problem with git and proxy server with authentication

## tl;dr

One message between Jan 24, 2018 and Jan 24, 2018.

replies: 0people: 1as markdown or json

Aleksey Yaroslavcev· Jan 24, 2018, 04:49 UTC · lore

Hi. (sory for my english - it's not native for me)

I use proxy-server with authentication. I have two instances of PortableGit: version 2.10.0.windows.1 and 2.16.1.windows.1 I added proxy settings in ~/.gitconfig.

If I try to pull my repository with version 2.16.1.windows.1 , I get error message: "fatal: unable to access 'https://aleksey_yaroslavcev@bitbucket.org/aleksey_yaroslavcev/testgitflow.git/': Proxy CONNECT aborted"

But pulling with version 2.10.0.windows.1 working fine with the same settings in ~/.gitconfig.

I decided to figure out what the problem is and found out the following. There is a difference in the way how git making connection through proxy. See the attached screenshots from WireShark.

In old version:
1. creating connection to proxy
2. trying to connect without authentication
3. proxy saying "407 Authentication Required" and requesting
termination of connection(FIN flag in TCP packet)
4. reseting conecction(RST flag in TCP packet)
5. creating another connection
6. trying to connect with authentication
7. Bingo!
In new version:
1. creating connection to proxy
2. trying to connect without authentication
3. proxy saying "407 Authentication Required" and requesting
termination of connection (FIN flag in TCP packet)
4. trying to connect with authentication in the same connection but
proxy is resetting connection (RST flag in TCP packet)

← back to recent threads