部署过程中出现key秘钥不对,在哪里设置解决呢?jenkins系统设置ssh访问都是连接正常的

来源:5-6 Jenkins pipeline job实战 - 三剑客环境搭建

慕仰1283249

2018-09-20

由用户 admin 启动
构建中 在工作空间 /var/lib/jenkins/workspace/ansible 中

git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
git config remote.origin.url git@192.168.1.48:root/ansible.git # timeout=10
Fetching upstream changes from git@192.168.1.48:root/ansible.git
git --version # timeout=10
using GIT_SSH to set credentials 192.168.1.48s
git fetch --tags --progress git@192.168.1.48:root/ansible.git +refs/heads/:refs/remotes/origin/
git rev-parse refs/remotes/origin/master^{commit} # timeout=10
git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 34af24968ee8854150bc4f1e9c0bdb268afc8a03 (refs/remotes/origin/master)
git config core.sparsecheckout # timeout=10
git checkout -f 34af24968ee8854150bc4f1e9c0bdb268afc8a03
Commit message: "777 ansible"
git rev-list --no-walk 34af24968ee8854150bc4f1e9c0bdb268afc8a03 # timeout=10
[ansible] $ /bin/bash /tmp/jenkins6261344789739576549.sh
192.168.1.101 | UNREACHABLE! => {
“changed”: false,
“msg”: “Failed to connect to the host via ssh: Host key verification failed.\r\n”,
“unreachable”: true
}
Build step ‘执行 shell’ marked build as failure
Finished: FAILURE

写回答

1回答

一路向北

2018-09-20

感谢这位同学的关注,可以查看一下ansible playbook使用哪个用户连接远程服务器。

0
0

Jenkins+Ansible+Gitlab-三剑合璧掌握自动化部署

整合三大工具解决自动化部署&持续交付问题

1290 学习 · 319 问题

查看课程