Git operations like push and pull via SSH prompt password

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.

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

git push -u origin main

git@git.server's password:

SSH connection

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.

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?

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

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