Gitea x keycloak with self sign cert dont work. #8253

Closed
opened 2025-11-02 07:59:45 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @wagfeliz on GitHub (Dec 15, 2021).

Gitea Version

last

Git Version

No response

Operating System

kubernetes 1.22

How are you running Gitea?

Gitea and keycloak are running in an kubernetess cluseter with cert-manager self-sign certificates.
The hosts are set in /etc/hosts.

Database

No response

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Description

I setup an env on kubernetes with gitea and keycloak with valid self-sign certificate and after I configure openId connect :

Failed to initialize OpenID Connect Provider with name 'Keycloak' with url 'https://keycloak.wade.com.br/auth/realms/master/.well-known/openid-configuration': Get "http://keycloak.wade.com.br/auth/realms/master/.well-known/openid-configuration": dial tcp: lookup keycloak.wade.com.br on 10.96.0.10:53: no such host

The address https://keycloak.wade.com.br is valid and with valid certificate both on kubernates and linux machine ( not in the nodes )

In the logs :
[Macaron] 2021-12-15 17:34:45: Started GET /user/oauth2/Keycloak for 10.40.0.0
[Macaron] 2021-12-15 17:34:45: Completed GET /user/oauth2/Keycloak 500 Internal Server Error in 1.777143ms

I also tried with the http://keycloak.wade.com.br , get the same error.

Do gitea works with openId with self sign certificate ? Several people told me it should work, but so far I got no luck making this to work.

Any tips ?

Screenshots

No response

Originally created by @wagfeliz on GitHub (Dec 15, 2021). ### Gitea Version last ### Git Version _No response_ ### Operating System kubernetes 1.22 ### How are you running Gitea? Gitea and keycloak are running in an kubernetess cluseter with cert-manager self-sign certificates. The hosts are set in /etc/hosts. ### Database _No response_ ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Description I setup an env on kubernetes with gitea and keycloak with valid self-sign certificate and after I configure openId connect : Failed to initialize OpenID Connect Provider with name 'Keycloak' with url 'https://keycloak.wade.com.br/auth/realms/master/.well-known/openid-configuration': Get "http://keycloak.wade.com.br/auth/realms/master/.well-known/openid-configuration": dial tcp: lookup keycloak.wade.com.br on 10.96.0.10:53: no such host The address https://keycloak.wade.com.br is valid and with valid certificate both on kubernates and linux machine ( not in the nodes ) In the logs : [Macaron] 2021-12-15 17:34:45: Started GET /user/oauth2/Keycloak for 10.40.0.0 [Macaron] 2021-12-15 17:34:45: Completed GET /user/oauth2/Keycloak 500 Internal Server Error in 1.777143ms I also tried with the http://keycloak.wade.com.br , get the same error. Do gitea works with openId with self sign certificate ? Several people told me it should work, but so far I got no luck making this to work. Any tips ? ### Screenshots _No response_
Author
Owner

@techknowlogick commented on GitHub (Dec 15, 2021):

This isn't an issue related to self-signed certs. The DNS is unable to resolve the host of your keycloak server. dial tcp: lookup keycloak.wade.com.br on 10.96.0.10:53: no such host. You'll need to debug the DNS of your kubernetes cluster to resolve.

@techknowlogick commented on GitHub (Dec 15, 2021): This isn't an issue related to self-signed certs. The DNS is unable to resolve the host of your keycloak server. `dial tcp: lookup keycloak.wade.com.br on 10.96.0.10:53: no such host`. You'll need to debug the DNS of your kubernetes cluster to resolve.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8253