SSH Key Authentication Failing When Cloning Repo from Gitea in LXC on Proxmox

Hi everyone,

I’ve set up a Gitea instance inside an LXC container on Proxmox. I’m trying to use SSH to clone a repository. I’ve added my public SSH key to my Gitea user account, but when I attempt to clone the repo, it keeps prompting me for a password instead of using the key.

After some investigation, I noticed that for some unknown reason, the SSH key is being rejected. I’ve tested this with multiple user accounts and even deployed a fresh Gitea server to rule out any misconfiguration — but the issue persists in both cases.

Has anyone else experienced this? Any suggestions would be greatly appreciated.

Thanks in advance!

You might have a wrong or no setup for your ssh config

add this:

Host gitea
  Hostname 192.168.1.101
  PubkeyAuthentication yes
  IdentityFile ~/.ssh/id_ed25519_key
  IdentitiesOnly yes
  ForwardAgent no
  User git

to your ~/.ssh/config

why the key is being rejected ?
do you have any logs ?
are you running a ssh server in the container or using the build-in ssh from Gitea ?