【发布时间】:2020-11-18 21:48:30
【问题描述】:
当尝试构建一个涉及连接到 git repo 的作业时,jenkins slave 无法克隆
回购。
当尝试与主人相同时,它可以工作。从站设置在 AWS EC2 实例 (Linux) 上。
这是一段控制台日志:
Started by user ...<br>
Running as SYSTEM<br>
Building remotely on Jenkins-Slave (Test) in workspace /home/jenkins-slave-01/workspace/TestSlave<br>
Selected Git installation does not exist. Using Default<br>
The recommended git tool is: NONE<br>
using credential d7068211-a7f3-4eef-8c5c-4ba6c23d3766<br>
Cloning the remote Git repository<br>
Cloning repository ... <br>
git init /home/jenkins-slave-01/workspace/TestSlave # timeout=10<br>
ERROR: Error cloning remote repo 'origin'<br>
hudson.plugins.git.GitException: Could not init /home/jenkins-slave-01/workspace/TestSlave
[...]
hudson.plugins.git.GitException: Error performing git command: git init /home/jenkins-slave-01/workspace/TestSlave
为了让奴隶使用 git 并克隆 repo,我需要做什么?
谢谢你的帮助。
【问题讨论】:
-
您确定您的实例有互联网接入,路由到互联网网关或nat网关
-
jenkins worker 上好像没有安装 git
-
看起来它甚至没有克隆,它卡在“git init”。检查该操作是否顺利
标签: git jenkins amazon-ec2