Skip to content
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

Suggestion: Add the Let's Encrypt Root & Intermediate certificates to the installer #3375

Closed
1 task done
tom-11880 opened this issue Aug 19, 2021 · 9 comments
Closed
1 task done

Comments

@tom-11880
Copy link

tom-11880 commented Aug 19, 2021

  • I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
git version 2.32.0.windows.2
cpu: x86_64
built from commit: 3d45ac813c4adf97fe3733c1f763ab6617d5add5
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

Microsoft Windows [Version 10.0.19042.1165]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

Editor Option: Notepad++
Custom Editor Path: 
Default Branch Option: main
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: CRLFCommitAsIs
Bash Terminal Option: MinTTY
Git Pull Behavior Option: Merge
Use Credential Manager: Core
Performance Tweaks FSCache: Enabled
Enable Symlinks: Disabled
Enable Pseudo Console Support: Enabled
Enable FSMonitor: Disabled

  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

** insert your response here **

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

Git Bash

I tried to do a git push to a repository running on a gogs server with a Let's encrypt SSL certificate
  • What did you expect to occur after running these commands?

I expected the push to succeed

  • What actually happened instead?

I got the following erro message: SSL Certificate problem: unable to get local issuer certificate.

  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

No, it is not a public URL.

I was able to fix the problem by adding the LetsEncrypt R3 certificate from https://letsencrypt.org/certificates/ to the bottom of
C:\Program Files\Git\mingw64\ssl\certs\ca-bundle.crt

Probably it would be a good idea to amend the installer with this certificates as well since more and mor servers are using Let'sEncrypt certificates.

@rimrul
Copy link
Member

rimrul commented Aug 19, 2021

The bundle is generated based on Mozillas CA list and should include let's encrypts ISRG Root X1.

@tom-11880
Copy link
Author

Thanks for the clarification.

The certificate path of the server certificate looks like this:

2021-08-20 20_42_48-Zertifikat

As I wrote, I just amended the ca-bundle file with the R3 certificate to get it working.

Not sure what I need to change on the gogs server side to get a certificate signed by the ISRG Root X1... I'll do some investigation though...

@mfriedrich74
Copy link

mfriedrich74 commented Aug 20, 2021 via email

@tom-11880
Copy link
Author

The certificate is brand new --- I set up the server 3 days ago.

@tom-11880
Copy link
Author

According to the page you referenced:

"Under normal circumstances, certificates issued by Let’s Encrypt will come from “R3”, an RSA intermediate."

The certificates for stackoverflow.com or letsencrypt.org are coming from R3 as well.

I just renewed the cert and it does come from R3

And according to https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/ the R3 root expires on September 30.

@mfriedrich74
Copy link

mfriedrich74 commented Aug 21, 2021 via email

@rimrul
Copy link
Member

rimrul commented Aug 21, 2021

Our RSA intermediates are signed by ISRG Root X1. ISRG Root X1 is widely trusted at this point, but our RSA intermediates are still cross-signed by IdenTrust’s “DST Root CA X3” (now called “TrustID X3 Root”) for additional client compatibility. The IdenTrust root has been around longer and thus has better compatibility with older devices and operating systems (e.g. Windows XP, Android 7).

So it's probably just windows displaying only one of multiple certificate chains.

@tom-11880
Copy link
Author

Confusing - but thanks for your support anyways :-)

I'm using a powershell module named "Posh-ACME", which (as I just learned) has a -PreferredChain parameter... I will test this on Monday and come back later with any findings ...

@tom-11880
Copy link
Author

tom-11880 commented Aug 21, 2021

I fixed the problem.

Instead of fiddling around with the local ca-bundle.crt, I added the intermediate R3 certificate to the end of the server certificate file and restarted gogs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants