# \[SOLVED\] Cannot use git over ssh

**URL:** <https://forum.gitea.com/t/solved-cannot-use-git-over-ssh/4511>\
**Category:** Install/Maintain/Configure\
**Created:** [January 29, 2022, 4:50am UTC](https://forum.gitea.com/t/solved-cannot-use-git-over-ssh/4511 "2022-01-29T04:50:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![qndydyhm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/qndydyhm/32/2163_2.png) [@qndydyhm](https://forum.gitea.com/u/qndydyhm)\
**Post date:** [January 29, 2022, 4:50am UTC](https://forum.gitea.com/t/solved-cannot-use-git-over-ssh/4511/1 "2022-01-29T04:50:54Z")

</div>

I am running gitea on Arch Linux, but I failed to get git over ssh work.  
I followed [Gitea - ArchWiki](https://wiki.archlinux.org/title/Gitea#Enable_SSH_Support) but git clone still shows

```auto
git clone ssh://gitea/username/test
Cloning to 'test'...
Gitea: Internal Server Error
Gitea: Internal Server Error
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

```

I have checked the authorized\_keys under ~/.ssh and it do managed by gitea and contains my public key

also simply ssh to it seems works but git over ssh doesn’t

```auto
$ ssh gitea
PTY allocation request failed on channel 0

Gitea: Internal error
Gitea: Internal error
Connection to git.domain.tld closed.

```

---

<div class="post-metadata">

**Author:** ![lunny](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/lunny/32/4701_2.png) [@lunny](https://forum.gitea.com/u/lunny)\
**Post date:** [January 29, 2022, 6:38am UTC](https://forum.gitea.com/t/solved-cannot-use-git-over-ssh/4511/2 "2022-01-29T06:38:21Z")

</div>

You can change RUN\_MODE to dev in app.ini and try again. It will display the error detail.

---

<div class="post-metadata">

**Author:** ![qndydyhm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/qndydyhm/32/2163_2.png) [@qndydyhm](https://forum.gitea.com/u/qndydyhm)\
**Post date:** [January 29, 2022, 9:12am UTC](https://forum.gitea.com/t/solved-cannot-use-git-over-ssh/4511/3 "2022-01-29T09:12:19Z")

</div>

fixed by switching to unix socket + nginx reverse proxy
