博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
git hook 自动部署
阅读量:4363 次
发布时间:2019-06-07

本文共 624 字,大约阅读时间需要 2 分钟。

1. 当前虚拟站点根目录的 .git/ 权限 

2. 当前项目裸仓库创建 hooks/post-receive 文件,并给予x 的权限

3. 复制如下内容

#!/bin/shunset $(git rev-parse --local-env-vars)REPO="git@123.111.11.11:edc2.git"#BRANCH=`echo $refname | sed -n 's/^refs\/heads\///p'`#BRANCH_DIR="/root"SSH_DEST="root@iZ255rhjhjhjhjhjhjt7otpZ"ssh "$SSH_DEST" /bin/sh <<-EOFcd /alidata/www/v2.edc.comgit pull origin masterEOF

  

*******************

可能有如下问题

su - git

ssh-keygen
ssh-copy-id michael@docker.example.com
ssh michael@docker.example.com

 

http://stackoverflow.com/questions/37455781/gitlab-post-receive-hook-host-key-verification-failed

 

转载于:https://www.cnblogs.com/yangyuqiu/p/6391813.html

你可能感兴趣的文章
谷歌跨域
查看>>
使用葡萄城报表,轻松实现高度精准的报表套打
查看>>
Linux命令
查看>>
unicode ascii 互转 函数 C实现 MultiByteToWideChar/WideCharToMultiByte 详解
查看>>
大三第一学期实验报告
查看>>
mysql远程链接
查看>>
nginx location配置
查看>>
Easy Install详细参数
查看>>
选课系统
查看>>
最简实例演示asp.net5中用户认证和授权(2)
查看>>
ubuntu rhythmbox乱码解决方法
查看>>
LeetCode题解之Univalued Binary Tree
查看>>
线程池学习研究-(自实现)2
查看>>
ubuntu下安装新字体
查看>>
Django连接MySQL数据库
查看>>
漫游Kafka入门篇之简单介绍(1)
查看>>
redis学习之旅-初识Redis
查看>>
WinForm 小程序 NotePad
查看>>
JSTL 核心标签库 使用
查看>>
线程池ThreadPool
查看>>