前提:服务器已安装JDK、Tomcat、Jenkins、Git。
1、安装插件“Publish Over SSH”、“Git plugin”
2、配置项目服务器ssh通信
项目服务器上生成密钥对
ssh-keygen
查看公钥
cat /root/.ssh/id_rsa.pub
复制公钥到/root/.ssh/authorized_keys
复制私钥到粘贴板
cat /root/.ssh/id_rsa
配置ssh通信:
项目服务器上生成密钥对
ssh-keygen
查看公钥
cat /root/.ssh/id_rsa.pub
复制公钥到/root/.ssh/authorized_keys
复制私钥到粘贴板
cat /root/.ssh/id_rsa
配置ssh通信: