解决Jenkins报错Failed to connect and initialize SSH connection问题

编译已成功,报错信息如下
SSH: Connecting from host [hc-jenkins]
09:39:50 SSH: Connecting with configuration [南充商超] …
09:39:51 ERROR: Exception when publishing, exception message [Failed to connect and initialize SSH connection. Message: [Failed to connect session for config [南充商超]. Message [Auth fail]]]
09:39:51 Build step ‘Send files or execute commands over SSH’ changed build result to UNSTABLE
09:39:51 [NanChongShangChao-Prod] $ /bin/sh /tmp/jenkins4921731150220628912.sh
09:40:08 Java代码规范检测结果: https://code-check.haichuang.pro/detection/NanChongShangChao192/report-18.html
09:40:08 New run name is ‘#18.4b85c25 - origin/master - Still Unstable’
09:40:08 Variable with name ‘BUILD_DISPLAY_NAME’ already exists, current value: ‘#18.4b85c25 - origin/master - Building’, new value: ‘#18.4b85c25 - origin/master - Still Unstable’
09:40:08 [description-setter] Description set:

点击查看代码规范检测结果


09:40:08 Archiving artifacts
09:40:10 Recording fingerprints
09:40:11 No emails were triggered.
09:40:11 Finished: UNSTABLE

百度之后说是没有配置ssh的key 可是我这边是直接没有用key的,内存也没有满.
后来在Jenkins的SSH测试中发现直接失败,知道了是服务器连接不上.
仔细查看高级配置之后想到了可能是因为密码的问题.
我的配置没有配密码,用的默认密码.后改为服务器密码,连接成功.
在这里插入图片描述
测试成功
在这里插入图片描述

  • 2
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值