这个相对来说是比较靠谱的:
|
把上述的 post-receive 文件放在这里:
/home/git/xxx.git/hooks/post-receive |
/www/wwwroot/xaoxuu.github.io
的权限要改成 777 才行
ssh 每次都要输密码,不知道是哪里没设置好。
安装了 GitLab
把上述的 post-receive 文件放在这里:
/var/opt/gitlab/git-data/repositories/root/xxx.git/custom_hooks/post-receive |
GitLab 的 ssh 能记住密钥, hook 也正常,缺点就是每个月多花10块钱满足 GitLab 最低配置要求。
404
打开 nginx 配置文件,拉到最后,看到:
include /www/server/panel/vhost/nginx/*.conf; |
然后根据这个路径找到自定义的配置文件:
/www/server/panel/vhost/nginx/xaoxuu.com.conf |
在其中添加如下代码就可以了:
server |