1

我正在尝试在可以与远程 Android git 存储库对话的 Windows 上设置 Jenkins。我但是,不断收到以下错误:

Using strategy: Default
Cloning the remote Git repository
Cloning repository https://github.com/***********`enter code here`
git --version
git version 1.7.4.msysgit.0.173.g83185.dirty
ERROR: Error cloning remote repo 'origin' : Could not clone https://github.com/*********
hudson.plugins.git.GitException: Could not clone https://github.com/*************
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.clone(CliGitAPIImpl.java:219)
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1001)
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:942)
    at hudson.FilePath.act(FilePath.java:865)
    at hudson.FilePath.act(FilePath.java:838)
    at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:942)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1101)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1364)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:670)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:575)
    at hudson.model.Run.execute(Run.java:1575)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:237)
Caused by: hudson.plugins.git.GitException: Command "C:\Program Files (x86)\Jenkins\PortableGit-pre-alpha-64-bit\cmd\git.cmd clone --progress -o origin https://github.com/******************* <http://localhost:8080/job/*********%20SCM%20Change%20Build%20-%20JenkinsTest2/ws/"> returned status code 128:
stdout: Cloning into <http://localhost:8080/job/******%20Change%20Build%20-%20JenkinsTest2/ws/...>

stderr: fatal: Authentication failed

    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:773)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.clone(CliGitAPIImpl.java:217)
    ... 14 more
Trying next repository
ERROR: Could not clone repository
FATAL: Could not clone
hudson.plugins.git.GitException: Could not clone
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1013)
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:942)
    at hudson.FilePath.act(FilePath.java:865)
    at hudson.FilePath.act(FilePath.java:838)
    at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:942)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1101)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1364)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:670)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:575)
    at hudson.model.Run.execute(Run.java:1575)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:237)

我尝试使用以下方法设置 ssh 密钥:

https://help.github.com/articles/generating-ssh-keys

但是,当我走到这一步时:

ssh -T git@github.com

我收到以下错误:

权限被拒绝(公钥)

在此处输入代码

我不确定我做错了什么,如果我什至需要设置 ssh 密钥,因为我正在尝试使用 https url

将不胜感激任何指针

4

1 回答 1

0

我遇到了同样的问题,因为我在 Jenkins 中使用的是 https URL 而不是 ssh url。一旦我更改了存储库部分中的 url,它就会像宣传的那样工作。

于 2013-05-25T20:34:25.353 回答