I can start the image, import the repositries I have created with git and see the content. I can clone the repositories created with gitea.
But I can’t push. The error message contains one line I can’t figure out:
remote: ./hooks/pre-receive.d/gitea: line 2: /app/gitea/gitea: No such file or directory
(more context)
To remote:/media/usbdrv/thomas/testme.git
! [remote rejected] newBranch -> newBranch (pre-receive hook declined)
error: failed to push some refs to 'remote:/media/usbdrv/thomas/testme.git'
When I look into the file system the gitea binary is found exactly there and nothing else. Also I am running gitea and can login, create users and so on.
I have registered my public key in gitea, but the name is “thomas@home.git” - I hope this is no issue?
I have searched the web and none of the suggestions I found were helpful. (especially executing “Resynchronize pre-receive, update and post-receive hooks of all repositories.” from Dashboard)
This is my current App.ini (some things omitted, which are irrelvant):
In your app.ini you have all paths (except repo root) set to /data/..., but your service has no volume attached there.
Could that be what’s tripping it up?
Nevertheless I’ve now started over, using the new raspberry image (bookworm) as ARM64 variant without desktop.
I once again installed docker and docker-compose. I also pulled gitea 1.21-rc1 and started -everything fine.
With this installation I am one step further, since I can push to repositories that were created with gitea.
Edit:
I’ve found that deleting post-receive.d pre-receive.d proc-receive.d update.d resolves the issue not being able to push, though the message remains. But another issue emerges: new branches, that are pushed to remote do not appear in gitea. renaming the repository folder twice (eg. foo.git → foo.mv → foo.git), so that gitea reads the branches again, helps.
But every imported repository leads to the same isse:
remote: ./hooks/pre-receive.d/gitea: line 3: /usr/local/bin/gitea: No such file or directory
To 192.168.0.142:/home/thomas/usbdrv/repositories/thomas/foome.git/
! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'remote:/home/thomas/usbdrv/repositories/thomas/foome.git/'
Since I was setting remote to the directory where the .git folder is located I was able to push via ssh. The pre-receive hook was declined after pushing the button in administration, where I couldn’t find any difference between an imported repo and one created by gitea.
Actually the issue is that pushing via ssh meant to push via port 22, totally ignoring the gitea config, in which port 222 is set as external port.
Configuring the remote paths in my local repositories to use the gitea path now allows to push, without any issue (despite the zero 2 W 1 Ghz core being a little underpowered, resulting in a 5 - 15 sec. delay).
Anyone reading this: check your configuration and remote paths for using the gitea connection. The hooks issue one can find googling is resolved in gitea since quite some versions and not related to the root cause of this topic.
If someone needs help configuring the remote addresses, try to clone a repository with the HTTP link, use git remote -v and adapt other repositories with this knowlegde.