# Git clone with ssh doesn't work

**URL:** <https://forum.gitea.com/t/git-clone-with-ssh-doesnt-work/8231>\
**Category:** Gitea Usages\
**Created:** [December 1, 2023, 11:32am UTC](https://forum.gitea.com/t/git-clone-with-ssh-doesnt-work/8231 "2023-12-01T11:32:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![michaelsnabel](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/michaelsnabel/32/4238_2.png) [@michaelsnabel](https://forum.gitea.com/u/michaelsnabel)\
**Post date:** [December 1, 2023, 11:32am UTC](https://forum.gitea.com/t/git-clone-with-ssh-doesnt-work/8231/1 "2023-12-01T11:32:01Z")

</div>

I hope this explains my issue:

Try to clone my app

```auto
PS C:\Users\michael\repositories\app> git clone git@192.168.10.1:michael/app.git
Cloning into 'app'...
git@192.168.10.1's password:

```

Testing ssh success

```auto
PS C:\Users\michael\repositories\app> ssh git@192.168.10.1
PTY allocation request failed on channel 0
Hi there, michael! You've successfully authenticated with the key named TestKey, but Gitea does not provide shell access.
If this is unexpected, please log in with password and setup Gitea under another user.
Connection to 192.168.10.1 closed.

```

Only way to successfully clone is by specifying my key manually

```auto
 git clone -c core.sshCommand="ssh -i 'C:\Users\michael\.ssh\id_rsa'" git@192.168.10.1:michael/app.git

```

Has anyone else ran into this issue? It’s almost as if git isn’t using the Windows ssh-agent Any advice would be appreciated.

---

<div class="post-metadata">

**Author:** ![Alexey](https://avatars.discourse-cdn.com/v4/letter/a/47e85d/32.png) [@Alexey](https://forum.gitea.com/u/Alexey)\
**Post date:** [December 4, 2023, 9:50pm UTC](https://forum.gitea.com/t/git-clone-with-ssh-doesnt-work/8231/2 "2023-12-04T21:50:26Z")

</div>

1. check shell of the user, it should be create with:  
adduser   
\*_–shell /bin/bash \*_
2. RSA keys, they also should be in home directory of your git user like: /home/git/.ssh

I sow you got a password, so i think there is no rsa key or they are with wrong directory (options)
