windows 2003服务器上的Jenkins git插件

windows 2003服务器上的Jenkins git插件,windows,git,jenkins,Windows,Git,Jenkins,我似乎无法让git插件在Jenkins上运行。已搜索并尝试了所有可能的建议解决方案 我已经正确地设置了Git、Putty-plink、环境变量和ssh密钥 命令行中的Git或gitbash工作正常。我可以运行Jenkins试图运行的所有命令,并且没有任何问题 我在c:\Documents and Settings\Administrator和c:\Program Files\Git上都有一个.ssh文件夹的副本 Jenkins windows服务正在本地系统指定的管理员帐户上运行 当Jenkin

我似乎无法让git插件在Jenkins上运行。已搜索并尝试了所有可能的建议解决方案

我已经正确地设置了Git、Putty-plink、环境变量和ssh密钥

命令行中的Git或gitbash工作正常。我可以运行Jenkins试图运行的所有命令,并且没有任何问题

我在c:\Documents and Settings\Administrator和c:\Program Files\Git上都有一个.ssh文件夹的副本

Jenkins windows服务正在本地系统指定的管理员帐户上运行

当Jenkins启动一个构建时,我不断得到一个错误:没有支持的身份验证方法可用。这看起来像Jenkins无法在.ssh文件夹中找到密钥

希望有人能帮忙

Started by user anonymous
Building in workspace C:\websites\companya\ci\ci1build
Checkout:ci1build / C:\websites\companya\ci\ci1build - hudson.remoting.LocalChannel@1b2bb77
Using strategy: Default
Fetching changes from 1 remote Git repository
Fetching upstream changes from git@github.com:companya/companya.git
ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
hudson.plugins.git.GitException: Command "git.exe fetch -t git@github.com:companya/companya.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout: 
stderr: trace: built-in: git 'fetch' '-t' 'git@github.com:companya/companya.git' '+refs/heads/*:refs/remotes/origin/*'
trace: run_command: 'C:\Program Files\PuTTY\plink.exe' '-batch' 'git@github.com' 'git-upload-pack '\''companya/companya.git'\'''
FATAL ERROR: Disconnected: No supported authentication methods available (server sent: publickey)
fatal: The remote end hung up unexpectedly

    at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:818)
    at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:780)
    at hudson.plugins.git.GitAPI.fetch(GitAPI.java:196)
    at hudson.plugins.git.GitAPI.fetch(GitAPI.java:1026)
    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:812)
    at hudson.plugins.git.GitSCM.access$100(GitSCM.java:90)
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1096)
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1064)
    at hudson.FilePath.act(FilePath.java:842)
    at hudson.FilePath.act(FilePath.java:824)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1064)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1245)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:589)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:494)
    at hudson.model.Run.execute(Run.java:1488)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:236)
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$2.invoke(GitSCM.java:1103)
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1064)
    at hudson.FilePath.act(FilePath.java:842)
    at hudson.FilePath.act(FilePath.java:824)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1064)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1245)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:589)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:494)
    at hudson.model.Run.execute(Run.java:1488)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:236)

尝试从控制台运行Jenkins,而不是作为服务运行。

它找不到您的私钥(可能您是作为不同的用户运行的?)

根据Git插件文档,您可以:

HOME=>SSH密钥所在的文件夹(例如C:\SSHKeys)


尝试在Jenkins中设置所有环境设置,但仍然没有成功。不要认为您可以在Windows中从命令行运行它。抛出异常。