Skip to content

Add support for reading and validating HTTPS certificates via Windows Certificate Store #301

Closed

Description

@faolan42

To aid in enterprise rollouts of git, supporting the Windows Certificate Store would be useful. Many enterprises have the ability to distribute trusted certificates as part of their Active Directory setups for their Windows users.

Similar support was added for git on OS X (at 1.8.0 I believe) to read the system Keychain for certificate validation when using HTTPS, and has been useful for deployments.

Activity

  1. dscho commented on Aug 22, 2015

    @dscho
    Member

    Are you talking about the credential store? As far as I understand that does not validate HTTPS certificates but only remembers (and offers) user/password combinations.

  2. dscho commented on Aug 27, 2015

    @dscho
    Member

    @drakino please note that I am waiting for your answer, and for clarification in general.

  3. dra27 commented on Aug 27, 2015

    @dra27

    It sounds more like a request to have the WinSSL feature of Curl - I've only had a quick glance, so sorry if it's off-track, but Git's (lib)curl seems to be compiled to use a ca-bundle.crt file only. The WinSSL feature of CURL (configure with --with-winssl) allows it to use the Windows Certificate Store root certificates (including, critically, domain certificates).

  4. dscho commented on Aug 27, 2015

    @dscho
    Member
  5. faolan42 commented on Aug 27, 2015

    @faolan42
    Author

    Appologies for the late response, and thanks for following up @dscho . Wanted to confirm that what @dra27 indicated is what I'm looking for.

    The personal reason for this request is from an observation of the behavior differences of Git on Windows and OS X. On Windows with the 2.5.0 git release, it won't verify a valid certificate from a root CA included in the ca-bundle.crt if an intermediate certificate is in the chain. I still need to verify the behavior on a Linux distro to compare. On OS X, it looks like Git uses the Keychain feature of the OS to validate certificates possibly via a feature similar to winssl in Curl.

    I generalized the request a bit to also support enterprises possibly using their own internal CA instead of an external one, something I've found in common use at a few companies. They frequently will use a feature of Active Directory to distribute their internal CA cert to Windows boxes, and it ends up being stored in the Windows Certificate Store.

  6. dscho commented on Aug 28, 2015

    @dscho
    Member

    @drakino happily, with the information I gave you, you can go wild and experiment -- with your existing setup -- how to rebuild the mingw-w64-curl package best. All you have to do is read up on rebuilding packages in the Git for Windows SDK, then follow the pointers I gave above. That will enable you to

    • build cURL with WinSSL support,
    • install the package in the Git SDK,
    • test whether, say, git clone respects the certificates you have in your Windows Certificate Manager, and
    • verify that cloning from GitHub still works (i.e. the CA bundle is still respected, too).

    That process might take an hour in total, although only 15 minutes of your time (most of the time will be spent by the SDK installer to download and install the SDK packages, and to clone and build Git for Windows itself).

  7. dra27 commented on Aug 30, 2015

    @dra27

    There's a security argument for not enabling openssl by default (though by now that's probably a huge regression!) - ca-bundle.crt is potentially a security hole if the user messes up file permissions, where the Windows Certificate Store is slightly harder to attack.

  8. dscho commented on Sep 9, 2015

    @dscho
    Member

    @drakino please note that once again, I wait for your feedback.

  9. 55 remaining items

  10. dscho commented on May 8, 2017

    @dscho
    Member

    @splatteredbits if you want to become so familiar as to become a regular contributor to the Git for Windows project, it will be easy to do without a reinstall.

    Otherwise, I would strongly suggest to simply reinstall; the installer will have remembered all your previous choices and all you need to do is to correct your mistake.

  11. jaylemur commented on Jun 28, 2017

    @jaylemur

    Does this new option only affect the GIT connection ?
    or also the SVN connection in case of command "git svn clone" ?

  12. dscho commented on Jul 16, 2017

    @dscho
    Member

    This option affects only the Git connection for now. I fear that git svn (by virtue of being a Perl script, using Subversion's Perl bindings) may be unaffected. Maybe you can find out how Subversion accesses HTTPS (I.e. whether it uses cURL)?

  13. added a commit that references this issue on May 14, 2021
  14. added a commit that references this issue on Jun 21, 2021
  15. added a commit that references this issue on Aug 18, 2021
  16. added a commit that references this issue on Jun 16, 2022
  17. added a commit that references this issue on Jul 23, 2024
  18. added a commit that references this issue on Jan 20, 2025
  19. added a commit that references this issue on Mar 6, 2025
  20. added a commit that references this issue on Mar 13, 2025
  21. added a commit that references this issue on Mar 26, 2025
  22. added a commit that references this issue on Aug 13, 2025
  23. added a commit that references this issue on Dec 17, 2025
  24. added a commit that references this issue on Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions