-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
LFS incompatible to cURL+winssl #1158
Comments
This doesn't feel like it's a Git for Windows issue if the non-LFS commands work fine. But let's get to the bottom of what you're seeing.
This needs more information, in particular:
Please provide some example output you are seeing by setting GIT_TRACE=1 and GIT_CURL_VERBOSE=1 before running the command that you're seeing fail. Certificates are fickle things when they don't work, so any extra context you can provide would be 💎 |
I agree that this may be a Git-LFS problem. @taylorr may be able to shed light into this: does Git LFS use OpenSSL internally for HTTPS transport? If so, is there an option to use Windows-native Secure Channel instead? |
I reinstalled with the OpenSSL option and replace C:\Program Files\Git\mingw64\ssl\certs\ca-bundle.crt. Replacing this file make LFS work with both options but it defeats the purpose of the SChannel option when LFS is used for a repository. I am not setting any environment variables (except the two mentioned by you for the output below). LFS fails with:
trace git-lfs: api error: Post https://xxxxx/yyyyy/zzzzz.git/info/lfs/objects/batch: x509: certificate signed by unknown authority Git LFS: (0 of 578 files) 0 B / 796.48 MB |
@hsattler again, this is most likely a problem with Git-LFS, and you are more likely to get answers there about the OpenSSL vs Secure Channel support. We do not even build Git-LFS in the Git for Windows project... |
My suggestions if LFS is not going to fix this:
|
I opened a git-lfs issue: git-lfs/git-lfs#2208 |
Yes, opening that ticket should have come before making plans in case Git-LFS does not fix that: you need to give them a chance to know about the problem in the first place. |
It seems that http.sslcainfo config item is the cause of the problem. Can the git-for-windows installer omit this setting when installing cURL that uses Windows Certificate Store? Or maybe install both cURL versions and switch between them like git lfs does? |
Sure. It should also remove it in case that the user chose Secure Channel. Maybe you want to give that a try? It'd be relatively easy: first, make your first custom installer, then modify |
I forgot to answer this question. It would be possible to install both, but that would not solve your problem: Git LFS does not use cURL. Instead, it uses the presence of the file indicated by In my previous comment, I indicated how to fix your problem. Please give it a try. |
I will try to tackle it after my vacation => July. Thanks for the hints. IMHO, ignoring the Windows Certificate Store when setting a set of wanted CAs is the right thing to do. Some kind of HPKP. |
@hsattler it's October now. Should we just close this as a WontFix? |
Currently, I do not have the time to look at this. I just remove the config line after installation. But it's still wrong that the installer puts it there and thus make git lfs fail. But if you are not going to change this, marking this bug "won't fix" is probably the right thing. |
When a proxy is required to access GitHub, and when http.proxy is not configured correctly, we want to lookup what Windows' configuration thinks we should use as a proxy, and try again. This fixes git-for-windows/git#1158 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Closing this bug in favor of #1409. |
Setup
defaults?
NOTE: This is what I have installed now to work around the issue. The bug report is about the winssl/SChannel CURL option!
to the issue you're seeing?
Git and LFS server use a company-signed root certificate. OpenSSL needs a replace of the ca-bundle.crt file but curl/winssl works without this.
Details
git bash, GitExtensions dialogs
Minimal, Complete, and Verifiable example
this will help us understand the issue.
The Files are loaded.
Certificate check failure in git-lfs. Non-LFS git command work and do not show a certificate failure.
Using the curl/openssl option and adding the company root certificate to the ca bundle, it works for git-lfs.
URL to that repository to help us with testing?
Sorry, internal company services.
But the problem should appear with any self-created CA and a server-certificate issued by it. Add the self-created CA to the Windows Certificate Store and install git with curl/winssl option.
The text was updated successfully, but these errors were encountered: