# gitee-update **Repository Path**: colingit/gitee-update ## Basic Information - **Project Name**: gitee-update - **Description**: gitee更新代码后,网站自动更新代码 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-03-28 - **Last Updated**: 2023-09-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # gitee-update #### 介绍 gitee更新代码后,网站自动更新代码 #### 使用说明 `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 2.先切换到nginx这个用户身份 ``` su nginx ``` 3.保存git密码 ``` git config --global credential.helper store ``` 4.执行 git pull 如果提示: ``` 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 If you wish to set tracking information for this branch you can do so with: git branch --set-upstream-to=origin/ master ``` 执行 ```git branch --set-upstream-to=origin/master master``` 5.正常输入用户名和密码后,就可以使用了 ##### 如何检查是否成功更新 默认日志文件在 laravel.log中 ``` tail -n 100 -f laravel.log | grep 'gitUpdate' ```