jenkins机器上操作
1 创建密钥对
ssh-keygen
(一路回车生成密钥对)
ssh-copy-id -i id_rsa.pub xxx.xxx.xxx.xxx
2 查看公钥配置gitlab ssh
cat /root/.ssh/id_rsa.pub
配置gitlab ssh
3 在jenkins配置私钥
jenkins机器上操作
1 创建密钥对
ssh-keygen
(一路回车生成密钥对)
ssh-copy-id -i id_rsa.pub xxx.xxx.xxx.xxx
2 查看公钥配置gitlab ssh
cat /root/.ssh/id_rsa.pub
配置gitlab ssh
3 在jenkins配置私钥