For security reasons, I have successfully made forgejo go into HTTPS mode by modifying app.ini file. I provided my own .crt and .key files , and I could access forgejo in https on my browser.
But then when I git clone my repository by using SSH, I see that it asked for forgejo user’s password. So I set one with passwd forgejo and then I retried git clone again. The result is it complained that the git repository doesn’t exist:
$ git clone ssh://forgejo@192.168.1.2/admin_user/My_Repo.git
Cloning into 'My_Repo'...
forgejo@192.168.1.2's password:
fatal: '/admin_user/My_Repo.git' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Before this, I have tried git clone http normally before I changed it to https, and git clone http worked fine. But now, I want to use SSH.
How to use SSH in this case? Any missing steps here?