1. 当前虚拟站点根目录的 .git/ 权限
2. 当前项目裸仓库创建 hooks/post-receive 文件,并给予x 的权限
3. 复制如下内容
#!/bin/sh unset $(git rev-parse --local-env-vars) REPO="[email protected]:edc2.git" #BRANCH=`echo $refname | sed -n ‘s/^refs\/heads\///p‘` #BRANCH_DIR="/root" SSH_DEST="[email protected]" ssh "$SSH_DEST" /bin/sh <<-EOF cd /alidata/www/v2.edc.com git pull origin master EOF
*******************
可能有如下问题
su - git
ssh-keygen
ssh-copy-id [email protected]
ssh [email protected]
http://stackoverflow.com/questions/37455781/gitlab-post-receive-hook-host-key-verification-failed
时间: 2024-10-09 05:23:38