ECMP中caddy配置git进行自动同步
ECMP中caddy配置git进行自动同步
git公开库的配置
这个简单粗暴,caddy配置文件中git模块的配置如下,
1
2
3
4
5
6
7
8
9
10
11
12
13
git {
repo https://github.com/xxx/blog
branch master
path /opt/share/www/default
interval 60
then chmod -R 777 /opt/share/www/default
}
就是这么简单
git私库的配置
caddy配置文件中git模块的配置如下,要加ssh:
1
2
3
4
5
6
7
8
9
10
11
git {
repo ssh://git@code.aliyun.com:123456/blog.git
path /opt/share/www/blog
interval 60
then chmod -R 777 /opt/share/www/blog
}
然后修改opt中ssh客户端的配置文件/opt/etc/ssh_config
1
StrictHostKeyChecking no
ok,搞定
本文由作者按照 CC BY 4.0 进行授权