【问题标题】:Local Jenkins (on Windows) Connecting to GitLab本地 Jenkins(在 Windows 上)连接到 GitLab
【发布时间】:2015-04-10 21:53:43
【问题描述】:

我遇到了很多关于拥有 Jenkins(在我的本地 Windows 笔记本电脑上运行)以及能够连接到私有 GitLab 存储库(我可以完全访问它)的问题,所以我添加了Jenkins 的私钥(我最初没有意识到我没有将我的密钥从 putty 转换为 OpenSSH,所以我已经修复了这个问题),我有使用 GitLab 中的公钥的部署密钥,然后我有多个 .ssh 文件夹放在我的本地文件系统中,因为我读到有人说要把它放在这里和那里,他们都有相同的密钥,但我把它们放在我的根 C、Git 和 Jenkins 文件夹中。我现在正在重新启动 Jenkins 以查看是否有帮助,但是我已经能够使用 Git bash 在我的本地计算机上克隆 Gitlab 存储库,使用“git clone git@URL.git”,它是成功的,但是在尝试构建时在 Jenkins 上,它显示了这一点:

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@URL.git # timeout=10 
Fetching upstream changes from git@URL.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@URL.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

我不知道从这里做什么,我已经研究这些问题几天了,我认为这可能是密钥问题,但我也读过一些路径的问题,所以我已经尝试在 Jenkins 配置中手动指定文件,并确保诸如使用带有“cmd”的 Git 路径之类的事情,不确定是否有其他人在连接到 Gitlab 的 Windows 上配置了 Jenkins 对这些问题有任何经验,但我真的很感激帮助。

【问题讨论】:

标签: git jenkins gitlab


【解决方案1】:

所以我最终通过使用 GitLab 提供的 HTTP URL 与使用 SSH URL 并使用该 URL 来让它工作,然后我将我的登录凭据添加到 GitLab 进行身份验证,这让我的 Jenkins 启动并运行.

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-06-13
    • 2021-05-10
    • 2017-03-17
    • 1970-01-01
    • 2018-01-04
    • 1970-01-01
    • 1970-01-01
    • 2019-03-16
    相关资源
    最近更新 更多