解决方法:
方法一
删除每个版本库下 hooks 文件夹,然后 重新同步所有仓库的 pre-receive、update 和 post-receive 钩子;
方法二
授予钩子文件操作权限
cd /home/git/gogs/gogs-repositories
chmod +x xxx/*/hooks/post-receive
chmod +x xxx/*/hooks/pre-receive
chmod +x xxx/*/hooks/update其中 “xxx” 为用户名。
迁移Gogs时尽量使用 tar 备份还原。
参考: