You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can clone, pull whatever. SSH properly setup and blabla.
Error message on push is the following (where git-mirror is the host for the machine).
[lycheejs] (development)$ git push mirror development
Counting objects: 80, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (76/76), done.
Writing objects: 100% (80/80), 15.28 KiB | 0 bytes/s, done.
Total 80 (delta 50), reused 0 (delta 0)
# XXX: Note this /home/alarm/gitea path, this is the outdated update hook path
remote: hooks/update: line 2: /home/alarm/gitea: Permission denied
remote: error: hook declined to update refs/heads/development
To git-mirror:Artificial-Engineering/lycheejs.git
! [remote rejected] development -> development (hook declined)
error: failed to push some refs to 'git@git-mirror:Artificial-Engineering/lycheejs.git'
Steps to reproduce
Installed gitea to /home/alarm to experiment around, start it and configure it.
Setup correct git user account.
Later moved things to /opt/gitea because I have an external HDD mount there (running on a Raspberry Pi 2).
Everything was configurable and modifyable in the custom/conf/app.ini
EXCEPT the update hooks. Those contain static paths to the old binary.
Quickfix for others
I made a little script that assumes the ./gitea-repositories folder is in the same folder as the gitea binary and that fixes all update hooks once run. In my case it's located in /opt/gitea/fix_repos.js where repos are in /opt/gitea/gitea-repositories. Link to the fix_repos.js script.
Problems caused
I saw a couple issues in upstream gogs where people had the same problems. It is totally unclear that you cannot move around gitea because I would assume that a binary can be copy/pasted with its config files and it should work isolated in that folder.
Suggestion
Maybe it makes sense to have a bootup routine that does a sanity checks for all update hooks when the gitea web service is started. So that it just makes sure that all paths are up to date and point to the correct binary.
The text was updated successfully, but these errors were encountered:
Enter Gitea admin panel on the UI, run Rewrite '.ssh/authorized_keys' file (caution: non-Gitea keys will be lost) and Rewrite all update hook of repositories (needed when custom config path is changed).
[x]
):Description
Problem Description / Error Message
git-mirror
is the host for the machine).Steps to reproduce
/home/alarm
to experiment around, start it and configure it.git
user account./opt/gitea
because I have an external HDD mount there (running on a Raspberry Pi 2).custom/conf/app.ini
Quickfix for others
I made a little script that assumes the
./gitea-repositories
folder is in the same folder as the gitea binary and that fixes all update hooks once run. In my case it's located in/opt/gitea/fix_repos.js
where repos are in/opt/gitea/gitea-repositories
. Link to the fix_repos.js script.Problems caused
I saw a couple issues in upstream gogs where people had the same problems. It is totally unclear that you cannot move around gitea because I would assume that a binary can be copy/pasted with its config files and it should work isolated in that folder.
Suggestion
Maybe it makes sense to have a bootup routine that does a sanity checks for all update hooks when the gitea web service is started. So that it just makes sure that all paths are up to date and point to the correct binary.
The text was updated successfully, but these errors were encountered: