【问题标题】:I am not able to build the job on jenkins from github我无法从 github 在 jenkins 上构建工作
【发布时间】:2015-09-28 18:13:23
【问题描述】:

我是 jenkins 的新手,我正试图在 jenkins 中创造一份工作。我已将我的项目推送到 github 并将 github 服务器的路径提供给 jenkins,但是当我尝试构建作业时,它显示错误并且无法构建......请帮助解决这个问题......

这是我得到的例外---

Started by user anonymous
Building in workspace C:\Users\Rishi\.jenkins\jobs\Spring\workspace
 > git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git.exe config remote.origin.url git@github.com:rishi1020/SpringMVC # 
timeout=10
Fetching upstream changes from git@github.com:rishi1020/SpringMVC
 > git.exe --version # timeout=10
using GIT_SSH to set credentials 
 > git.exe -c core.askpass=true fetch --tags --progress git@github.com:rishi1020/SpringMVC +refs/heads/*:refs/remotes/origin/*
ERROR: Timeout after 10 minutes
ERROR: Error fetching remote repo 'origin'

【问题讨论】:

  • 你有时间了。请检查您的机器是否可以访问存储库。

标签: java github jenkins


【解决方案1】:

如果您只需要从 GitHub 存储库中获取,则无需使用 ssh(这需要正确的私有/公共 ssh 密钥才能运行)。

使用https url,不需要任何身份验证(用于拉取)

 https://github.com/rishi1020/SpringMVC

【讨论】:

  • ssh 和 Jenkins 的问题在于,Jenkins 通常不使用与您设置 ssh 密钥的帐户相同的帐户。由于拉取公共 GitHub 存储库不需要身份验证,因此您不妨跳过 ssh 并使用 HTTPS。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-08-26
  • 2015-09-30
  • 1970-01-01
相关资源
最近更新 更多