{"thread":{"id":"47676","subject":"Problem with git and proxy server with authentication","startedAt":"2018-01-24T04:50:03Z","lastAt":"2018-01-24T04:50:03Z","messageCount":1,"participants":["Aleksey Yaroslavcev"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"337204","messageId":"CAHnnmh6QCnHTycbMDLjfFYoXW4dErTZoTHsPrkYdhZKnXcHHYQ@mail.gmail.com","threadId":"47676","inReplyTo":null,"subject":"Problem with git and proxy server with authentication","fromName":"Aleksey Yaroslavcev","fromEmail":"a.yaroslavcev@gmail.com","sentAt":"2018-01-24T04:49:56Z","receivedAt":"2018-01-24T04:50:03Z","isPatch":false,"sender":{"key":"a.yaroslavcev@gmail.com","avatar":null},"body":"Hi.\n(sory for my english - it's not native for me)\n\nI use proxy-server with authentication.\nI have two instances of PortableGit: version 2.10.0.windows.1 and\n2.16.1.windows.1\nI added proxy settings in ~/.gitconfig.\n\nIf I try to pull my repository with version 2.16.1.windows.1 , I get\nerror message:\n\"fatal: unable to access\n'https://aleksey_yaroslavcev@bitbucket.org/aleksey_yaroslavcev/testgitflow.git/':\nProxy CONNECT aborted\"\n\nBut pulling with version 2.10.0.windows.1 working fine with the same\nsettings in ~/.gitconfig.\n\nI decided to figure out what the problem is and found out the\nfollowing. There is a difference in the way how git making connection\nthrough proxy. See the attached screenshots from WireShark.\n\nIn old version:\n1. creating connection to proxy\n2. trying to connect without authentication\n3. proxy saying \"407 Authentication Required\" and requesting\ntermination of connection(FIN flag in TCP packet)\n4. reseting conecction(RST flag in TCP packet)\n5. creating another connection\n6. trying to connect with authentication\n7. Bingo!\n\nIn new version:\n1. creating connection to proxy\n2. trying to connect without authentication\n3. proxy saying \"407 Authentication Required\" and requesting\ntermination of connection (FIN flag in TCP packet)\n4. trying to connect with authentication in the same connection but\nproxy is resetting connection (RST flag in TCP packet)\n"}]}