git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Problem with git and proxy server with authentication

From
AYAleksey Yaroslavcev <a.yaroslavcev@gmail.com>
Date
Jan 24, 2018, 04:49 UTC
Message-ID
<CAHnnmh6QCnHTycbMDLjfFYoXW4dErTZoTHsPrkYdhZKnXcHHYQ@mail.gmail.com>

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)
Message 1 of 1 in “Problem with git and proxy server with authentication”
  1. Aleksey YaroslavcevJan 24, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.