-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Git LFS behind a proxy #5730
Comments
Hey, I'm sorry you're having trouble, and thanks for the detailed report. I think I've been able to reproduce this issue with a fairly simple case. Assuming there's a repository on GitHub like
The issue, I believe, stems from a differing interpretation of an empty I'm therefore going to mark this as a bug, since we aim to follow Git's implementation in these sorts of matters. |
Thanks for the detailed investigation, and I think this is exactly the problem I encountered. Now by setting NO_PROXY I temporarily bypass this bug. |
A few extra notes from some investigation into ways to address this issue: There's a bit of a confusing history to the relevant code. The original implementation dates from PR #1358, where an empty Git configuration setting was ignored and treated as an unset value, so any environment variables would then take effect. There was a change in PR #3062 to a later version of this code with the stated intention of fixing the bug reported in #3060, where environment variables supposedly took precedence over Git configuration settings. However, from what I can tell, that change (which persists in the current version of the code) had no real effect, which suggests that the bug report was either incorrect or reflected some particular condition which was not documented at the time. Confusingly, in commit 5db9370 of PR #3062 the So far as I can tell, though, at no point were empty Git configuration settings (or empty but not unset environment variables) considered in any of these changes. Meanwhile, ever since the first implementation in PR #1358 we've honoured the
On that note, we also incorrectly prefer the uppercase version of
The behaviour above appears to stem from the Go language's support for these environment variables, which reads both However, the Go implementation in the But we still treat any proxy defined for HTTP as a fallback for HTTPS connections, reflecting how the Go language implementation used to behave. As well, there are some oddities in our We also perform some checks, like the check for an empty Whether we can fix all of these concerns in the v3.x release series I'm not immediately certain. We should be able to address most of the issues, but removing support for |
Describe the bug
I'm using git lfs behind an entreprise proxy that rejects requests to https://git.my-entreprise.com (I can access those domains directly).
I've set environment variables "HTTP_PROXY" and "HTTPS_PROXY" and updated gitconfig as below to ignore proxy for that domain.
When I clone a repo from the internal site, It fails to download and prints out:
Output
After unset "HTTP_PROXY" and "HTTPS_PROXY", I can clone the repo without any problem.
But I have to set those enviroment variables in order to make other softwares to work.
So in my case, did git lfs really respect proxy settings in .gitconfig?
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Proxy settings in .gitconfig overrides "HTTP_PROXY" and "HTTPS_PROXY" environment variables
System environment
git config -l
Output of
git lfs env
git lfs env
Additional context
GIT_TRACE=1 GIT_TRANSFER_TRACE=1 GIT_CURL_VERBOSE=1 git clone
The text was updated successfully, but these errors were encountered: