Github hudson.plugins.git.GitException:无法从任何存储库获取

Github hudson.plugins.git.GitException:无法从任何存储库获取,github,maven-2,hudson,Github,Maven 2,Hudson,我想配置hudson+git并创建一个构建。但我有以下例外: Started by user nitish Checkout:workspace / /root/.hudson/jobs/NightlyGit/workspace - hudson.remoting.LocalChannel@dd7efd Using strategy: Default Checkout:workspace / /root/.hudson/jobs/NightlyGit/workspace - hudson.rem

我想配置hudson+git并创建一个构建。但我有以下例外:

Started by user nitish
Checkout:workspace / /root/.hudson/jobs/NightlyGit/workspace - hudson.remoting.LocalChannel@dd7efd
Using strategy: Default
Checkout:workspace / /root/.hudson/jobs/NightlyGit/workspace - hudson.remoting.LocalChannel@dd7efd
Fetching changes from the remote Git repository
Fetching upstream changes from https://github.com/test/eng.git
ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
ERROR:  (Underlying report) : Error performing command: /usr/bin/git fetch -t https://github.com/test/eng.git +refs/heads/nightly:refs/remotes/origin/nightly
Command "/usr/bin/git fetch -t https://github.com/test/engile.git +refs/heads/nightly:refs/remotes/origin/nightly" returned status code 128: error: The requested URL returned error: 401 while accessing https://github.com/test/eng.git/info/refs

fatal: HTTP request failed

ERROR: Could not fetch from any repository
FATAL: Could not fetch from any repository
hudson.plugins.git.GitException: Could not fetch from any repository
    at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:887)
    at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:845)
    at hudson.FilePath.act(FilePath.java:758)
    at hudson.FilePath.act(FilePath.java:740)
    at hudson.plugins.git.GitSCM.gerRevisionToBuild(GitSCM.java:845)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:622)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1483)
    at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:507)
    at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:424)
    at hudson.model.Run.run(Run.java:1366)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:145)

我是git的新手,我不知道确切的问题是什么,在hudson中使用git时是否需要任何认证?。现在我已经创建了hudson作业并提供了git存储库链接,但它抛出了上述异常。有人能帮我解决这个问题吗。

我已经在hudson服务器上创建了SSH密钥,并将其添加到解决我问题的github帐户中

试试这个:

  • 转到作业的“配置”页面

  • 在源代码管理下→ Git其他行为,添加行为“清除存储库并强制克隆”

  • 单击保存按钮

  • 再次尝试构建


  • 你使用的是什么版本的hudson和git插件?hudson git插件是2.2.0,hudson版本是2.3.6我正在关注链接,但不理解作为运行hudson的用户登录