git - 詹金斯奴隶无法克隆 git repo
问题描述
当尝试构建一个涉及连接到 git repo 的作业时,jenkins slave 无法克隆 repo。
当尝试与主人相同时,它可以工作。从站设置在 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,我需要做什么?
谢谢你的帮助。
解决方案
解决方案是在运行 jenkins slave 的 EC2 实例上安装 git。我只是忘记了这一点。
推荐阅读
- altair - 在 Altair 中使用第二列进行刻面
- mysql - 设置 FOREIGN_KEY_CHECKS = ON; 当我们导入数据库一个 Xampp
- kubernetes - Kubernetes Service 可以控制给定 pod 的流量百分比吗?
- google-data-studio - 在 Google Data Studio 中运行 Delta 问题
- git - 将功能分支合并到主要错误:您正在尝试根据过期信息修改拉取请求
- docker - 如何将发行版弹性搜索服务连接到 docker compose 中定义的另一个服务
- powerbi-desktop - Power Bi 公式 Value.Is([Column], type date) 不起作用
- svg - 为什么无论填充规则如何,我都无法填充路径中的某些区域?
- java - 从 localhost 导入列表时,人们如何修复反序列化错误?
- python - 如何从一个孩子是特定值的 XML 中提取多个孙子/孩子?