amcolin/gitee-update

gitee

维护者

详细信息

gitee.com/colingit/gitee-update

dev-master 2023-05-12 03:31 UTC

This package is not auto-updated.

Last update: 2023-10-13 05:10:36 UTC


README

介绍

在gitee更新代码后,网站会自动更新代码

使用说明

使用composer命令安装:composer require amcolin/gitee-update

将以下内容添加到app.php的providers数组中

\Amcolin\GiteeUpdate\GiteeUpdateProvider::class

生成gitee.php配置文件

执行以下命令:php artisan vendor:publish --provider="Amcolin\GiteeUpdate\GiteeUpdateProvider"

配置
return [
    'password' => '' , // GIT钩子密码
    'nginxUser' => 'www' , // nginx用哪个用户跑
    'userGroup' => 'www' , // 用户所在组
];

常见问题

代码部署在docker中如何使用?

1. 进入容器,查看代码文件所属用户。假设是nginx。

su nginx

2. 切换到nginx用户身份。

git config --global credential.helper store

3. 保存git密码。

There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> master

4. 执行git pull,如果提示:

执行git branch --set-upstream-to=origin/master master

5. 正常输入用户名和密码后,就可以使用了。

默认日志文件在laravel.log中。

tail -n 100 -f laravel.log | grep 'gitUpdate'