diff --git a/plugins/gitea/hook/commit.tpl b/plugins/gitea/hook/commit.tpl index 8bbfbdd58..20c4673d7 100755 --- a/plugins/gitea/hook/commit.tpl +++ b/plugins/gitea/hook/commit.tpl @@ -8,6 +8,10 @@ GIT_SDIR="{$CODE_DIR}" GIT_USER_DIR="${GIT_SDIR}/{$USERNAME}" GIT_PROJECT_DIR="${GIT_USER_DIR}/{$PROJECT}" +if [ ! -d $GIT_PROJECT_DIR ];then + mkdir -p $GIT_PROJECT_DIR + chown -R www:www $GIT_PROJECT_DIR +fi git config --global credential.helper store git config --global pull.rebase false