Jenkins-部署java代码项目
实验环境: Jenkins:192.168.1.12 tomcat:192.168.1.7 一、新建远程代码Java项目仓库 说明:这边测试是在coding上注册账户,建立远程仓库,coding地址: https://coding.net/login ,也可以使用gitlub和github作为远程仓库,自由选择。 1:新建test-java项目 2:在Jenkins机器上生成秘钥对 [root@Jenkins ~]# ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: a6:08:32:2e:1d:a6:85:bb:7e:64:dd:92:f7:60:b2:67 root@ghs The