You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 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)
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)
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.
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".
Activity
technoweenie commentedon May 15, 2015
Thanks for the report.
rseymour commentedon Nov 24, 2015
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.
technoweenie commentedon Nov 25, 2015
Just added this to the v1.2 checklist in #844.
nkoterba commentedon Jan 25, 2016
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.
bmabey commentedon Feb 19, 2016
I just ran into this problem with our GHE install as well. It turns out
hubis facing the same issue and some people have done some investigation around using the OSx keychain: mislav/hub#852 (comment)sinbad commentedon Mar 2, 2016
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)sinbad commentedon Mar 8, 2016
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:
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.
sinbad commentedon Mar 17, 2016
This has been addressed via #1067 and #1081 for git-lfs 1.2.
syedaali commentedon Jan 18, 2019
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".