# Git operations like push and pull via SSH prompt password

**URL:** <https://forum.gitea.com/t/git-operations-like-push-and-pull-via-ssh-prompt-password/7585>\
**Category:** Install/Maintain/Configure\
**Created:** [July 19, 2023, 2:27pm UTC](https://forum.gitea.com/t/git-operations-like-push-and-pull-via-ssh-prompt-password/7585 "2023-07-19T14:27:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![techrick](https://avatars.discourse-cdn.com/v4/letter/t/eada6e/32.png) [@techrick](https://forum.gitea.com/u/techrick)\
**Post date:** [July 19, 2023, 2:27pm UTC](https://forum.gitea.com/t/git-operations-like-push-and-pull-via-ssh-prompt-password/7585/1 "2023-07-19T14:27:00Z")

</div>

My gitea server is running on RHEL 8. The server is not containerized. When trying to git push or pull through SSH from client I am prompted for a password for the account that manages gitea on the server.

```auto
git remote -v

origin git@git.server:mdt/test-repo.git (fetch)
origin git@git.server:mdt/test-repo.git (push)

```

**Pushing to a repo**

```auto
git push -u origin main

git@git.server's password:

```

**SSH connection**

```auto
ssh -T git@git.server

Hi there, testUser! 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.

```

What solutions I have tried

- Disable SELinux
- Verifed that the account that manages gitea (git) has shell access
- Performed tests from a different client machine
- Created new ssh keys and imported public keys into gitea web client.
- Verified permission rights for **/home/git/.ssh** _(700)_
- Verified permission rights for **/home/git/.ssh/authorized\_keys** _(600)_

Thank you for your help in advance.

---

<div class="post-metadata">

**Author:** ![jolheiser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/jolheiser/32/4807_2.png) [@jolheiser](https://forum.gitea.com/u/jolheiser)\
**Post date:** [July 19, 2023, 3:48pm UTC](https://forum.gitea.com/t/git-operations-like-push-and-pull-via-ssh-prompt-password/7585/2 "2023-07-19T15:48:42Z")

</div>

If the key you are using is recognized by Gitea, it should be running the command specified in `authorized_keys` which should forward it to Gitea internally.

Is `testUser` a user on Gitea?

---

<div class="post-metadata">

**Author:** ![techrick](https://avatars.discourse-cdn.com/v4/letter/t/eada6e/32.png) [@techrick](https://forum.gitea.com/u/techrick)\
**Post date:** [July 19, 2023, 10:39pm UTC](https://forum.gitea.com/t/git-operations-like-push-and-pull-via-ssh-prompt-password/7585/3 "2023-07-19T22:39:32Z")

</div>

Yes, `testUser` is a user on Gitea. Below is the contents of the `autorized_keys` file just in case I am missing something.

**Contents of `authorized_keys`**

```auto
command="/usr/local/bin/gitea --config=/etc/gitea/app.ini serv key-2",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty,no-user-rc,restrict ssh-ed25519 MYSUPERSECRETPUBLICKEYOOOOOO

```
