Can not clone from ssh

OS:centos7
Gitea Version: 1.16.5

I add SSH key to my account.

connect correct.

tempsn22ip

But I can not clone from SSH。Cloning from https works fine.

How can I solve this problem?

You’ll need to find out what the “internal error” is. You can find more about which logs you’ll need to configure/look at here: Advanced: Logging Configuration - Docs

Thank you for your help.
I have got the error log detail,and repaired.Now,everything is OK.

That means, you haven’t add git to ssh user git’s PATH. A simple way is to add git to a global PATH.

loged in as root

add “export PATH=$PATH:/usr/local/git-2.35.1/bin” to /etc/profile

Then run “source /etc/profile”
and run “git --version”
It is fine.

logged as git

add “export PATH=$PATH:/usr/local/git-2.35.1/bin” to /home/git/.bash_profile

and run “git --version”
It is fine.

However,the problem is still not solved.

I add soft link to “/usr/local/bin/” like this:

ln -s /usr/local/git-2.35.1/bin/git /usr/local/bin/git
ln -s /usr/local/git-2.35.1/bin/git-upload-pack /usr/local/bin/git-upload-pack
ln -s /usr/local/git-2.35.1/bin/git-receive-pack /usr/local/bin/git-receive-pack
ln -s /usr/local/git-2.35.1/bin/git-cvsserver /usr/local/bin/git-cvsserver
ln -s /usr/local/git-2.35.1/bin/gitk /usr/local/bin/gitk
ln -s /usr/local/git-2.35.1/bin/git-shell /usr/local/bin/git-shell
ln -s /usr/local/git-2.35.1/bin/git-upload-archive /usr/local/bin/git-upload-archive

problem solved.