Skip to content

git-lfs will not use sslCAInfo or urlmatch #308

Closed

Description

@andyneff

Slightly related to #276, but git-lfs does not support sslCAInfo, so if I have a ca to point to, no dice.

Further more it does not support "urlmatch" for additional http in the config either, so if in my global ~/.gitconfig I...

[http]
    sslVerify = False

This works of course,

I can not

[http "https://only.one.site.com/"]
    sslVerify = False

I think this it mainly due to b94361f git-lfs/lfs/http.go Line: 41, but That's my 5 second guess

Needless to say,

[http "https://only.one.site.com/"]
    sslCAInfo = /home/me/.ssl/trusted.crt

Won't work either.

Activity

  1. technoweenie commented on May 15, 2015

    @technoweenie
    Contributor

    Thanks for the report.

  2. rseymour commented on Nov 24, 2015

    @rseymour

    I want to fire up another issue w/r/t git-lfs not looking at windows' certificate store either, but it's windows and... I'm at my limit of caring.

  3. technoweenie commented on Nov 25, 2015

    @technoweenie
    Contributor

    Just added this to the v1.2 checklist in #844.

  4. nkoterba commented on Jan 25, 2016

    @nkoterba

    Jumping on the bandwagon here, but is it possible for git-lfs to use the Mac OSX keychain? We have all our self-signed certs for our various internal machines stored in Keychain and it would be nice for git-lfs (and its internal use of SSL) to "apply" any that match the URL/address of the GIT LFS backend server.

    I know there's something similar for using Mac OSX keychain to store GIT HTTP basic Auth credentials: https://help.github.com/articles/caching-your-github-password-in-git/

    It would be great if it would also use certs from there.

  5. bmabey commented on Feb 19, 2016

    @bmabey

    I just ran into this problem with our GHE install as well. It turns out hub is facing the same issue and some people have done some investigation around using the OSx keychain: mislav/hub#852 (comment)

  6. self-assigned this
    on Mar 2, 2016
  7. sinbad commented on Mar 2, 2016

    @sinbad
    Contributor

    I'm working on this now, I plan to try to support SSLCAInfo, Mac OS X keychain and Windows certificate store. (edit: to clarify Mac OS X keychain is already supported so long as you imported your self-signed certificate into the System keychain and not the Login keychain. edit2: actually not true, it reads the 'System Root Certificates' which is a separate keychain. So I probably need to support both the System and Login keychains)

  8. sinbad commented on Mar 8, 2016

    @sinbad
    Contributor

    Quick update as I've been doing some experiments & testing, turns out that git-lfs will already work with self-signed certificates that are trusted in the Windows Certificate Store, because the core golang implementation for root certs does that. Worked for me when I imported them on Windows 10 into the Trusted Root Certificates area in certmgr.msc anyway. Git, however, doesn't look there (as of 2.7.1) so you still need to set http.sslcainfo to make that part work.

    Interestingly this is entirely the opposite of Mac OS X where git itself already looks in the user-modified keychain for trusted certs but golang only looks in the core as-shipped root keychain. 😞

    So the trusted cert gaps to plug in git-lfs are:

    • http.sslCAinfo support on all platforms
    • Support System keychain on Mac OS X (not system root certs keychain which golang already supports but this isn't the one users modify with self-signed certs)

    I've chosen just the System keychain rather than login keychain because this is actually where browsers like Chrome look; simpler to be consistent with others.

    On Windows in practice most people will have to use the sslCAinfo route if they're using HTTPS clone URLs, even though git-lfs/golang already supports the cert store, due to lack of core git support. They can however use the cert store route if they're using SSH clone URLs since only the git-lfs endpoint will use the cert.

  9. sinbad commented on Mar 17, 2016

    @sinbad
    Contributor

    This has been addressed via #1067 and #1081 for git-lfs 1.2.

  10. syedaali commented on Jan 18, 2019

    @syedaali

    Did something relating to this issue change in git-lfs > 2.3.4? We have a root CA in Mac OSX System KeyChain which git-lfs is not "reading". Versions prior to 2.3.4 appear to work fine. We get an error "x509: certificate signed by unknown authority" when trying to post. We are able to work around this with "GIT_SSL_NO_VERIFY=true".

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions