Gitea web not updating pages correctly

problem:
1. The overview doesn’t show accurate information
2. some repositories won’t be displayed in website at all while others do.

info:
I deployed gitea in my local network on lets say 192.168.1.10
Stuff worked well with one test repo.

I then changed it to IP 192.168.1.10:4000 (forwarded with nginx + SSL to giteas 3000).
Still, it was working fine.
Then I switched to push and pull with ssh instead of http.
From then on the behaviour is an annoyance.

For one, the ‘overview’ window in the website doesn’t show the actual commit count nor the messages about them (ssh pushes wont be listed there, http did).

Also I have some repos, f.e.:
https://192.168.1.10:4000/organisation2/repositoryone
https://192.168.1.10:4000/organisation2/repositorythree
‘repository one’ does show up with the correct pushed files (via ssh) in the web overview on
While ‘repository three’ still shows the initial gitea instructions on how to push although the git itself is set up corectly (as in we can pull from it via ssh and get its contents).

Any Ideas and suggestions on where to look for solutions? Been ignoring it but I cant do that any longer…

What version of Gitea are you using? As well, do you have any logs you can provide?

Gitea Version: 1.10.1

https://pastebin.com/DzyRQa42
from /var/log/gitea.log

had to cut away a bit as pastebins 512k limit.

But HTTP still works? I’m thinking this is an ssh forwarding problem somehow, but I’m not sure.
Can you provide your app.ini with any sensitive data scrubbed?

yes, http is working as intended.

there is the app.ini
https://pastebin.com/Rx68ANdQ

the following might help. I have to push differently with ssh than in the repo website.
repo website says:
ssh://git@localhost:1122/org/repo.git
which does obviously not work.
ssh://git@192.168.1.10:1122/home/git/gitea-repositories/org/repo.git
is the way I use it.

Now, after pulling(http), changing something and pushing(http) repositorythree (for example) has its content listed on the webpage, also I am able to push the same repo via ssh and it shows up - but still not in the overview.

/home/git/gitea-repositories/org/repo.git implies you are bypassing Gitea to push to your repo, in which case Gitea doesn’t do any of its internal updates.

the other command does not work though (of course I dont have an /org folder in / ). (with localhost replaced by IP). Also, in the adminpanel I reordered lots of checks on repos and this also does not update them.

Have you looked at the issues listed in the FAQ?
That may shed some light on whether Gitea is indeed managing the SSH connections.

Also regarding this, this would be caused by an incorrect setting in your app.ini, namely SSH_DOMAIN and/or SSH_PORT
More information at https://docs.gitea.io/en-us/administration/config-cheat-sheet/

the following might help. I have to push differently with ssh than in the repo website.
repo website says:
ssh://git@localhost:1122/org/repo.git
which does obviously not work.
ssh://git@192.168.1.10:1122/home/git/gitea-repositories/org/repo.git
is the way I use it.

You are not using a key managed by Gitea therefore its hooks aren’t being run and it isn’t told about your changes.

What happens if you do: ssh git@192.168.1.10:1122 ? You should not get a prompt - you should get told that gitea does not provide shell access.

You need to either use a different ssh key or remove the duplicate ssh key from authorized_keys. (It would be the first copy of the key.)

NB: From 1.12+ (i.e. on master) Gitea’s hooks will only accept pushes from a gitea key (or an appropriately setup environment.)

1 Like

I took a look in the FAQ. Didnt help sadly. I also changed the app ini (ssh_domain).

@zeripath
if I do ssh git@192.168.1.10:1122 I cannot resolve the hostname. this makes sense.
If I do ssh -p 1122 git@192.168.1.10 I get logged in.

I also tried enabling the built-in ssh server. Same results, I get logged in.

I did ran Resynchronize pre-receive, update and post-receive hooks of all repositories and the ssh/authorized_keys one in the webUI.

If you manage to log in, that means Gitea is definitely not intercepting the SSH connection.

Yes I thought so.

Any Idea on how to fix this?