I am trying to enable SSH on my Gitea instance. Though I feel like I have done everything right to achieve this including the guide that Gitea recommends, I am unable to push anything to my Gitea instance via SSH. I am able to push via HTTP.
One of the things I am trying to do is to use this guide to automate backups of my Home Assistant config files. I have followed the guide multiple times (after deleting previous work like the .ssh folder and even known_hosts in the system .ssh folder. I have even tried a clean install of dietpi.) and when I get to the part where I try to push the commit to my repo (git push -u origin master), I get a return asking for a password even though I have already generated a key and posted the public key to the repository (and have also tried posting it to the account as a whole). I also made sure to give write permissions to the repo. This is the response I get:
➜ /config git:(master) git push -u origin master
dietpi@dietpi.sudo> 's password:
fatal: ‘ltm/Home-Assistant-Backup.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.
I have also tried to make a key pair on my desktop and adding it to the account using the same guide to add one to Github and am unable to connect.
Here is my Gitea [server] config in custom/app.ini:
[server]
SSH_DOMAIN = dietpi.sudo
DOMAIN = dietpi.sudo
HTTP_PORT = 3000
ROOT_URL = http://dietpi.sudo:3000/
DISABLE_SSH = false
SSH_PORT = 22
LFS_START_SERVER = true
LFS_CONTENT_PATH = /mnt/dietpi_userdata/gitea/data/lfs
LFS_JWT_SECRET = [redacted]
OFFLINE_MODE = true
I am hoping someone can shed some light and point me in the right direction to be able to get SSH working.
Thanks