Windows ssh setup fail

I have setup my local gitea.
It is installed in c:/gitea.
It is running correctly with http.
I can clone repo using http.
I cannot using ssh, I have a verified ssh key.
But when I tried to clone a repo using ssh, I got:
Cloning into ‘test’…

The authenticity of host ‘srvdevit (10.0.0.45)’ can’t be established.

ED25519 key fingerprint is SHA256:iqwly3dM23XQ71wMTK+mHYxPJD+8HbrSrdio2m/J6Ko.

This key is not known by any other names.

Are you sure you want to continue connecting (yes/no/[fingerprint])? yes

Warning: Permanently added ‘srvdevit’ (ED25519) to the list of known hosts.

adminlch@srvdevit’s password:

‘git-upload-pack’ is recongnized has an internal command.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

It looks like this issue: SSH on Windows configuration and usage

‘git-upload-pack’ is recongnized has an internal command.

This error means it cannot find git-upload-pack in PATH. It also looks like adminlch is wrong user for Gitea or authorized_keys file is not configured correctly in SSH server, because it should be using SSH key authentication and not SSH password authentication.

1 Like

The only way I found to make it work was to set up the internal ssh server of gitea and stop the sshd service from open ssh. This way I was able to use ssh

START_SSH_SERVER = true
SSH_LISTEN_PORT = 22
BUILTIN_SSH_SERVER_USER = “git”