jenkins连接ubuntu普通用户节点

1.创建credentials

2.创建node

3.在jenkins服务器还需要进行的操作(jenkins服务器中)

mkdir /var/lib/jenkins/.ssh

ssh-keyscan -H 192.168.110.204 >> /var/lib/jenkins/.ssh/known_hosts

chown -R jenkins:jenkins /var/lib/jenkins/.ssh/

4.远程目录/opt需要授权(节点ubuntu中)

chown -R yinjiaxing:yinjiaxing /opt

5.安装java环境(节点ubuntu中)

sudo apt install openjdk-11-jdk -y

否则会出现的错误:

/var/lib/jenkins/.ssh/known_hosts [SSH] No Known Hosts file was found at /var/lib/jenkins/.ssh/known_hosts.

以及:

java.io.IOException: Could not copy remoting.jar into '/opt' on agent

Caused by: com.trilead.ssh2.SFTPException: Permission denied (SSH_FX_PERMISSION_DENIED: The user does not have sufficient permissions to perform the operation.)

相关推荐
Hi竹子10 小时前
Linux Centos 安装Jenkins到服务
linux·centos·jenkins
霍格沃兹测试开发学社测试人社区1 天前
Jenkins与不同阶段测试的完美结合
运维·软件测试·人工智能·测试开发·jenkins
Hi竹子1 天前
Jenkins简单的安装运行
运维·servlet·jenkins
安的列斯凯奇1 天前
JavaRestClient 客户端初始化+索引库操作
运维·jenkins
霍格沃兹测试开发学社测试人社区2 天前
Jenkins质量门禁设计方案的深入探讨
运维·软件测试·测试开发·jenkins
cmgdxrz2 天前
持续集成 02|Jenkins介绍与安装、Postman集成Jenkins、代码集成Jenkins
运维·ci/cd·jenkins
快乐就好ya2 天前
Docker+Jenkins+Tomcat(保姆级教学)
java·开发语言·docker·容器·jenkins
雨露天泽3 天前
jenkins
运维·jenkins
健康平安的活着3 天前
jenkins的作用以及操作
运维·jenkins