When pushing, pre-commit hook fails when using LETS_ENCRYPT #2697

Closed
opened 2025-11-02 04:44:46 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @jryan128 on GitHub (Dec 30, 2018).

Description

Push to repo is failing with lets_encrypt enabled.

  1. Setup new gitea 1.6.2 instance following instructions
  2. Add lets_encrypt to config
  3. Create new repo
  4. Try to push to repo
  5. Push preRecieveHook fails with error
    retrieve protected branches information failed: Get https://localhost:443/api/internal/branch/1/master: remote error: tls: internal error

If you set LOCAL_ROOT_URL to the domain name like so, https://git.example.com:443/ it fixes the issue.

I imagine there should be some better default behavior here. Like if SSL enabled to use the real domain name instead?

Thanks!

Originally created by @jryan128 on GitHub (Dec 30, 2018). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. 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.6.2 - Git version: 2.11.0 - Operating system: Debian 9.6 (stretch) - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [X] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [X] Not relevant - Log gist: https://gist.github.com/jryan128/83b1678715c51ae7ec8fe0bcb7322728 - Config gist: https://gist.github.com/jryan128/732ae49844b03a9ddb46dbb7749e8ce8 ## Description Push to repo is failing with lets_encrypt enabled. 1. Setup new gitea 1.6.2 instance following instructions 2. Add lets_encrypt to config 3. Create new repo 4. Try to push to repo 5. Push preRecieveHook fails with error `retrieve protected branches information failed: Get https://localhost:443/api/internal/branch/1/master: remote error: tls: internal error` If you set `LOCAL_ROOT_URL` to the domain name like so, `https://git.example.com:443/` it fixes the issue. I imagine there should be some better default behavior here. Like if SSL enabled to use the real domain name instead? Thanks!
GiteaMirror added the issue/duplicate label 2025-11-02 04:44:46 -06:00
Author
Owner

@techknowlogick commented on GitHub (Dec 30, 2018):

Closing as dupe of #5540

Thank you for reporting the issue :)

@techknowlogick commented on GitHub (Dec 30, 2018): Closing as dupe of #5540 Thank you for reporting the issue :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2697