Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
sburkard opened this issue Dec 15, 2022 · 10 comments
Closed

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

sburkard opened this issue Dec 15, 2022 · 10 comments
Milestone

Comments

@sburkard
Copy link

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.

@rimrul
Copy link
Member

rimrul commented Dec 15, 2022

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.

@sburkard
Copy link
Author

sburkard commented Dec 16, 2022

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!

@dscho
Copy link
Member

dscho commented Dec 16, 2022

@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.

@dscho
Copy link
Member

dscho commented Dec 19, 2022

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.

@dscho
Copy link
Member

dscho commented Dec 21, 2022

This will most likely be addressed by #4191.

@dscho
Copy link
Member

dscho commented Dec 21, 2022

@sburkard please test the tentative installer or the tentative Portable Git.

@dscho
Copy link
Member

dscho commented Dec 21, 2022

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

The workflow run was started

github-actions bot pushed a commit to git-for-windows/build-extra that referenced this issue Dec 21, 2022
A [regression](git-for-windows/git#4171) that

Signed-off-by: gitforwindowshelper[bot] <gitforwindowshelper-bot@users.noreply.github.com>
@dscho dscho closed this as completed Dec 21, 2022
@sburkard
Copy link
Author

I tested the tentative Portable Git installer and it worked perfectly

image

Thanks a lot

@dscho
Copy link
Member

dscho commented Dec 22, 2022

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

@sburkard
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants