3

Github/Jenkins で発生した認証の問題について助けが必要です。

セットアップは次のとおりです。 Jenkins マスターは Windows 上にあります スレーブは OSX 上で実行されています Jenkins はスレーブと正常に通信できます

プライベート git リポジトリからプルしようとすると、次のエラーが表示されます。このエラーは、マスターまたは他の Linux スレーブのいずれにも発生せず、OSX ターミナルで正常にクローンされます。

Started by user xxxxxxxxxxxx
[EnvInject] - Loading node environment variables.
Building remotely on MAC01 in workspace /var/jenkins/workspace/xxxxxxxxxxxx
Checkout:NativeiOSSlots / /var/jenkins/workspace/xxxxxxxxxxxxx - hudson.remoting.Channel@166d8eb:MAC01
Using strategy: Default
Last Built Revision: Revision 7232678c31bf2c6f3c4bd5a66b349edf9288440c (origin/HEAD, origin/master)
Cloning the remote Git repository
Cloning repository <repo url>
git --version
git version 1.8.3.1
ERROR: Error cloning remote repo 'origin' : Could not clone <repo url>
hudson.plugins.git.GitException: Could not clone <repo url>
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:226)
    at org.jenkinsci.plugins.gitclient.AbstractGitAPIImpl.clone(AbstractGitAPIImpl.java:57)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.clone(CliGitAPIImpl.java:33)
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1012)
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:948)
    at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2387)
    at hudson.remoting.UserRequest.perform(UserRequest.java:118)
    at hudson.remoting.UserRequest.perform(UserRequest.java:48)
    at hudson.remoting.Request$2.run(Request.java:326)
    at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:680)
Caused by: hudson.plugins.git.GitException: Command "/Applications/GitHub.app/Contents/Resources/git/bin/git clone --progress -o origin <repo url> /var/jenkins/workspace/xxxxxxxxxx" returned status code 128:
stdout: Cloning into '/var/jenkins/workspace/xxxxxxxxxx'...

stderr: remote: Repository not found.
fatal: Authentication failed for '<repo url>'

    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:790)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$100(CliGitAPIImpl.java:33)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:224)
    ... 14 more

何か案は?

4

4 に答える 4

2

私は同じ問題に直面していました。Jenkin は私の git リポジトリをローカル PC に複製できませんでした。

解決:

  1. services.msc を開始します。
  2. Jenkins サービスに移動し、そのプロパティを開きます
  3. [ログオン] タブに移動し、エアコンのユーザー名とパスワードを入力します。
  4. サービスを再起動します。

エンタープライズログインとパスワードをそこに入力したため、これらの手順で問題が解決しました。

于 2013-09-19T12:36:41.997 に答える
0

Most likely the user that the Jenkins slave runs as on your Mac isn't properly set up for github (doesn't have the proper certificate). On my Mac slave that's the user named jenkins. Log in as that user on your slave and see if you can do:

ssh -T git@github.com

If that's not working, make sure you have the proper certificate installed and that the machine can see the outside world.

于 2013-08-31T01:27:30.950 に答える
-1

jenkins を実行しているユーザーとして実行すると、端末から本当に正常にクローンされますか?

SSH アクセスが適切に設定されていない可能性があります。これを参照してください:リポジトリを複製できませんでした

于 2013-08-30T20:23:22.073 に答える