Wrong ssh url path


#1

hello,

gitea shows wrong repo path.

path in gitea:
git@web-app:organisation/repo.git

git clone says:
fatal: ‘organisation/repo.git’ does not appear to be a git repository
fatal: Could not read from remote repository.

when i change the path manually to
git@web-app:/home/git/repos/organisation/repo.git
then it works.

my repository and server settings:

[repository]
ROOT = /home/git/repos

[server]
SSH_DOMAIN       = web-app
DOMAIN           = web-app
HTTP_PORT        = 3000
ROOT_URL         = http://web-app:3000
DISABLE_SSH      = false
SSH_PORT         = 22
LFS_START_SERVER = true
LFS_CONTENT_PATH = /home/git/gitea/lfs
LFS_JWT_SECRET   = xxxxxxxxxxxxxxxxxxx
OFFLINE_MODE     = false

what’s wrong in my config?

tahnks


#2

I suppose you are not right,
if you use absolute path it means that the ‘git’ user has the shell access to the server and you will use ssh-key from ‘/home/git/.ssh/authorized_keys’ file instead of keys which is added to the gitea user profile via UI.
so then as a result you will be able to push inside not own repo

I had similar issue(https://stackoverflow.com/questions/49297267)
the issue was fixed by disabling the ‘LFS_START_SERVER’ option