# Windows ssh setup fail

**URL:** <https://forum.gitea.com/t/windows-ssh-setup-fail/7622>\
**Category:** Install/Maintain/Configure\
**Created:** [July 25, 2023, 10:18am UTC](https://forum.gitea.com/t/windows-ssh-setup-fail/7622 "2023-07-25T10:18:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lch](https://avatars.discourse-cdn.com/v4/letter/l/a587f6/32.png) [@lch](https://forum.gitea.com/u/lch)\
**Post date:** [July 25, 2023, 10:18am UTC](https://forum.gitea.com/t/windows-ssh-setup-fail/7622/1 "2023-07-25T10:18:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![lch](https://avatars.discourse-cdn.com/v4/letter/l/a587f6/32.png) [@lch](https://forum.gitea.com/u/lch)\
**Post date:** [July 25, 2023, 10:19am UTC](https://forum.gitea.com/t/windows-ssh-setup-fail/7622/2 "2023-07-25T10:19:50Z")

</div>

It looks like this issue: [SSH on Windows configuration and usage](https://forum.gitea.com/t/ssh-on-windows-configuration-and-usage/6477)

---

<div class="post-metadata">

**Author:** ![jake](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@jake](https://forum.gitea.com/u/jake)\
**Post date:** [July 26, 2023, 5:09am UTC](https://forum.gitea.com/t/windows-ssh-setup-fail/7622/3 "2023-07-26T05:09:18Z")

</div>

> ‘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.

---

<div class="post-metadata">

**Author:** ![lch](https://avatars.discourse-cdn.com/v4/letter/l/a587f6/32.png) [@lch](https://forum.gitea.com/u/lch)\
**Post date:** [July 26, 2023, 12:12pm UTC](https://forum.gitea.com/t/windows-ssh-setup-fail/7622/4 "2023-07-26T12:12:24Z")

</div>

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”
