Skip to content

no_proxy env var no more working due to curl version used #4171

Closed

Description

@sburkard

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options

git version 2.39.0.windows.1
cpu: x86_64
built from commit: de9501c66f93785f7eaf10d02ef08d231eb11688
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

Microsoft Windows [Version 10.0.18363.2274]
  • What options did you set as part of the installation? Or did you choose the
    defaults?

No options, just default

  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

Git installed through Scoop package manager

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

Git Bash and Powershell

PS C:\Users\MyAccount> **$env:no_proxy**
localhost,.[company-domain].ch
PS C:\Users\MyAccount> git clone https://gitlab.[company-domain].ch/...[reponame] .\scoop\buckets\[reponame]
Cloning into '.\scoop\buckets\[reponame]'...
fatal: unable to access 'https://gitlab.[company-domain].ch/.../[reponame]/': **Received HTTP code 504 from proxy after CONNECT**

  • What did you expect to occur after running these commands?

That the repository is cloned

  • What actually happened instead?

An error because curl tries to reach the internal repository through the proxy. It actually ignores the no_proxy environment variable

This seems to be broken in curl and already fixed. See also curl/curl#9884

It would be nice to have a Git for Windows Release that uses an older version of curl where the no_proxy variable is used correctly.

Activity

  1. rimrul commented on Dec 15, 2022

    @rimrul
    Member

    It would be nice to have a Git for Windows Release that uses an older version of curl where the no_proxy variable is used correctly.

    Like Git for Windows 2.38.1 and earlier? Curl v7.87.0 with the fix for this regression is expected for next week. I don't think we'll rollback our curl version and create a 2.39.0(2) for this minor regression.

  2. sburkard commented on Dec 16, 2022

    @sburkard
    Author

    Like Git for Windows 2.38.1 and earlier?

    The point with Scoop is that it pulls the latest version. So currently fresh git installs with Scoop are stuck to 2.39.0.
    There is a possibility to use scoop install git@[version], but that did not work for me.

    But since the next curl release is expected for next week, this is probably not a big issue.
    Thanks!

  3. dscho commented on Dec 16, 2022

    @dscho
    Member

    @sburkard you could also backport the relevant patch(es), add them as .patch file(s) to https://github.com/git-for-windows/MINGW-packages/tree/HEAD/mingw-w64-curl (you will want to imitate git-for-windows/MINGW-packages@7b39ea8) and open a PR, if you care about this bug enough to put in the effort. I would be delighted to accept such a PR.

  4. added this to the Next release milestone on Dec 19, 2022
  5. dscho commented on Dec 19, 2022

    @dscho
    Member

    In anticipation of the upcoming cURL version, I added this to the "Next milestone", i.e. to the list of tickets that will go into the next official Git for Windows release.

  6. dscho commented on Dec 21, 2022

    @dscho
    Member

    This will most likely be addressed by #4191.

  7. dscho commented on Dec 21, 2022

    @dscho
    Member
  8. dscho commented on Dec 21, 2022

    @dscho
    Member

    /add release note bug A regression that caused no_proxy to be ignored was fixed by upgrading libcurl.

    The workflow run was started

  9. added a commit that references this issue on Dec 21, 2022
  10. sburkard commented on Dec 21, 2022

    @sburkard
    Author

    I tested the tentative Portable Git installer and it worked perfectly

    image

    Thanks a lot

  11. dscho commented on Dec 22, 2022

    @dscho
    Member

    Thank you for testing. You will be delighted to learn that v2.39.0(2) was released in the meantime, containing the fix.

  12. sburkard commented on Dec 22, 2022

    @sburkard
    Author

    Thank you for testing. You will be delighted to learn that v2.39.0(2) was released in the meantime, containing the fix.

    Yes, awesome! And the new version is already delivered via Scoop 😄
    Thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions