我正在尝试在Jenkins(在Windows上)创建作业,这应该从git和构建项目中获取。所以我配置git,但它不起作用。
步骤配置:
1。管理Jenkins - > Git部分下的系统配置 - >
Git安装 - > Git可执行文件的路径指定git.exe路径C:\ Program Files(x86)\ Git \ cmd \ git.exe
2. 创建新职位
凭据:添加了包含以下参数的凭据:
范围:全球
用户名:设置git用户名
私钥:直接选择回车并设置id_rsa文件的内容
高级 - >密码短语:输入密码短语
要构建的分支:* / first_demo
构建控制台输出后:
Building in workspace D:\jenkins_workspace
C:\Program Files (x86)\Git\cmd\git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
C:\Program Files (x86)\Git\cmd\git.exe config remote.origin.url git@github.com:example/example.git # timeout=10
Fetching upstream changes from git@github.com:example/example1.git
C:\Program Files (x86)\Git\cmd\git.exe --version # timeout=10
using GIT_SSH to set credentials
C:\Program Files (x86)\Git\cmd\git.exe -c core.askpass=true fetch --tags --progress git@ssh.github.com:example/example1.git +refs/heads/*:refs/remotes/origin/*
ERROR: Timeout after 10 minutes
ERROR: Error fetching remote repo 'origin'
ERROR: Error fetching remote repo 'origin'
Finished: FAILURE
你能帮忙解释它为什么不工作吗?
答案 0 :(得分:1)
git clone默认超时为10分钟,您可以通过在Jenkins项目上使用git进行克隆时添加高级行为来更改它。 您可以使用以下步骤来完成此操作: