How to use HTTPS on windows server? #6881

Closed
opened 2025-11-02 07:09:50 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @harkirat777 on GitHub (Feb 17, 2021).

  • Gitea version (or commit ref): 1.13.0
  • Operating system: Microsoft Server 2012 R2

Description

We are running Gitea as windows service. I have followed the instructions in docs for HTTPS setup Using the built-in server. But, https://[HOST]:3000/ gives certificate error on the server and the clients.
Log file has following error:
...c/net/http/server.go:3095:logf() [I] http: TLS handshake error from 10.X.X.X:63846: remote error: tls: unknown certificate

Is there another step we are missing?

Originally created by @harkirat777 on GitHub (Feb 17, 2021). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Make sure it's not mentioned in the FAQ (https://docs.gitea.io/en-us/faq) 5. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.13.0 - Operating system: Microsoft Server 2012 R2 ## Description We are running Gitea as windows service. I have followed the instructions [in docs for HTTPS setup Using the built-in server](https://docs.gitea.io/en-us/https-setup/#using-the-built-in-server). But, https://[HOST]:3000/ gives certificate error on the server and the clients. Log file has following error: `...c/net/http/server.go:3095:logf() [I] http: TLS handshake error from 10.X.X.X:63846: remote error: tls: unknown certificate` Is there another step we are missing?
GiteaMirror added the type/questionissue/needs-feedback labels 2025-11-02 07:09:50 -06:00
Author
Owner

@techknowlogick commented on GitHub (Feb 17, 2021):

TLS handshake error from 10.X.X.X:63846: remote error: tls: unknown certificate means that the client is offering up a certificate.

What error do browsers give when accessing your install? On your browser it'll say something like the error is due to the cert being expired, the authority is not known to your device, the cert has been revoke, or one of many more possible errors.

@techknowlogick commented on GitHub (Feb 17, 2021): `TLS handshake error from 10.X.X.X:63846: remote error: tls: unknown certificate` means that the client is offering up a certificate. What error do browsers give when accessing your install? On your browser it'll say something like the error is due to the cert being expired, the authority is not known to your device, the cert has been revoke, or one of many more possible errors.
Author
Owner

@harkirat777 commented on GitHub (Feb 18, 2021):

We are getting NET::ERR_CERT_AUTHORITY_INVALID.
This CA Root certificate is not trusted because it is not in the Trusted Root Certification Authorities store.

How can I push this certificate to all the clients? Is there a way to accomplish this without Group Policy?

@harkirat777 commented on GitHub (Feb 18, 2021): We are getting NET::ERR_CERT_AUTHORITY_INVALID. `This CA Root certificate is not trusted because it is not in the Trusted Root Certification Authorities store.` How can I push this certificate to all the clients? Is there a way to accomplish this without Group Policy?
Author
Owner

@techknowlogick commented on GitHub (Feb 18, 2021):

You either need to use a certificate that has an authority already trusted by the remote machines, or you need to push the authority to the machines. You can have people manually install the authority on their machines, but I strongly recommend using an authority that is already trusted. You could use caddyserver in front of Gitea and use their Letsencrypt DNS implementation if this instance is not available to the internet.

However Gitea is serving the certificate you provided correctly, as such I will be closing this.

@techknowlogick commented on GitHub (Feb 18, 2021): You either need to use a certificate that has an authority already trusted by the remote machines, or you need to push the authority to the machines. You can have people manually install the authority on their machines, but I strongly recommend using an authority that is already trusted. You could use caddyserver in front of Gitea and use their Letsencrypt DNS implementation if this instance is not available to the internet. However Gitea is serving the certificate you provided correctly, as such I will be closing this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6881