Hi All,
I've had Gitea running for quite a while and it's all been working great. However, that was with all the repos set to public, I've now changed it so that some repos are private and am now struggling to access them through Git CLI. It still works perfectly through the browser and I can pull public repos with no issues.
When I try and clone a private repo using HTTPS it first opens a login page on my Gitea instance and then when I log in it redirects to an error page, with firefox saying:
Secure Connection Failed
An error occurred during a connection to 127.0.0.1:58683. SSL received a record that exceeded the maximum permissible length.
Error code: SSL_ERROR_RX_RECORD_TOO_LONG
This is consistent on other browsers and I haven't been able to figure out why it is happening.
Looking through the socker logs as I request the repo shows:
024/03/07 17:26:35 ...eb/routing/logger.go:102:func1() router: completed GET {REPO}.git/info/refs?service=git-upload-pack for 172.19.0.2:46594, 401 Unauthorized in 4.4ms @ repo/githttp.go:532(repo.GetInfoRefs)
2024/03/07 17:26:40 ...eb/routing/logger.go:102:func1() router: completed GET /login/oauth/authorize?response_type=code&client_id={VALUE}&state={VALUE}&code_challenge_method=S256&code_challenge=k_{VALUE}&redirect_uri=http%3a%2f%2f127.0.0.1%3a50480%2f for 172.19.0.2:46618, 303 See Other in 14.8ms @ auth/oauth.go:362(auth.AuthorizeOAuth)
Which doesn't seem to show an obvious problems? Again, I can access everything perfectly normally through the browser it's just trying to pull it over Git CLI.
As a bonus question, does anyone have a guide for setting up SSH? I can't figure out how that works either. I have a SSH key (called "id_ed25519") in ~/.ssh which I have registered with the SSH agent as described [here](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#adding-your-ssh-key-to-the-ssh-agent) as well as adding and verifying the key on my GItea account through the browser.
When I then try and clone a repo using the address given on the browser, `git clone ssh://git@gitea.{MY_DOMAIN}:24/{REPO}.git`, then it just times out and says the host is unreachable. I realise SSH is typically port 22 but that is already used and so the container won't start if it tries to use that port so it is changed to "Git over SSH container port 22, host port 24". and shows up as SWAG connecting the host port 24 to the container port 22. SSH is enabled in the app.ini file for Gitea.
I can post any more configuration files if required but am honestly not sure what is pertinent.
Thanks in advance.