【发布时间】:2017-08-17 12:49:39
【问题描述】:
您好,我只想将我的项目从 github 配置到 jenkins 以生成构建。 我收到以下错误
Failed to connect to repository : Command "/usr/bin/git ls-remote -h
https://github.com/xxxxx/yyyyy.git HEAD"
returned status code 128:
stdout:
stderr: error: The requested URL returned error: 403 Forbidden while
accessing https://github.com/xxxxx/yyyyy.git/info/refs
fatal: HTTP request failed
我还在全局工具配置中添加了 git 路径。我已经在 linux centos 服务器上设置了 jenkins。
我在 stackoverflow 中发现了一些类似的问题,但这并没有给出解决方案
谁能告诉我这可能有什么问题? 在此先感谢
【问题讨论】:
-
我查看了上述问题的答案并尝试过,但无法解决这个问题。在这里我使用的是安装在 linux centos 中的 jenkins
-
由于您使用的是 https URL,因此您的凭据是否与您的 GitHub 登录名/密码匹配(提示:您的 locgin 不是电子邮件地址)。您是否为您的 GitHub 帐户激活了 2FA(双因素身份验证)?
-
是的凭据与 GitHub 帐户匹配,我没有激活 2FA。
-
您能否在另一台机器(如 windows)中检查该进程,以确认您的确认是否与 URL 或 Linux 机器中为 git 访问和 jenkins 提供的权限有关。
标签: git github jenkins build centos