go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.08k stars 5.41k forks source link

When I enable HTTPS and pushed, it said that "Gitea: Internal Server Connection Error." #31647

Open Creeper-xie opened 1 month ago

Creeper-xie commented 1 month ago

Description

My CA cert is self-signed. I enabled HTTPS protocol by set " PROTOCOL = https CERT_FILE = /var/lib/gitea/ssl/https.crt KEY_FILE = /var/lib/gitea/ssl/https.key". Git clone repos by https protocol is OK, but error used ssh protocol.Used ssh protocol to pull or push, It said that "Gitea: Internal Server Connection Error fatal: Could not read from remote repository

Please make sure you have the correct access rights and the repository exists." And used https protocol to push, it said " remote: Gitea: Internal Server Connection Error To https://ip:3000/Sniventals/test.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://ip:3000/Sniventals/test.git' "

Gitea Version

1.22.1

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/Creeper-xie/208139810da9c2840f03a59282986211

Screenshots

ResizedImage_2024-07-17_13-16-45_1871 ResizedImage_2024-07-17_13-35-43_2075

"gp" alias to "git push"

Git Version

2.45.2

Operating System

Debian SID

How are you running Gitea?

I download gitea from this Github release. https://github.com/go-gitea/gitea/releases/tag/v1.22.1

Database

PostgreSQL

amix307 commented 1 month ago

@Creeper-xie when you set https, you must change ROOT_URL in app.ini too And of course one of the best ways for https is using ext reverce proxies like nginx

lunny commented 1 month ago

Can you paste your configuration about ROOT_URL and LOCAL_ROOT_URL?

ccheath commented 23 hours ago

remote: Gitea: Internal Server Connection Error To https://ip:3000/Sniventals/test.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://ip:3000/Sniventals/test.git' "

I'm having the same issue after a fresh install...