Ich versuche ein Jenkins-Projekt aus einem Bitbucket-Repository zu erstellen. Diese Builds sollten bei jedem Push ausgeführt werden. Jenkins ist auf meinem lokalen Computer eingerichtet.Bitbucket Hook schlägt für Jenkins Project fehl
Ich habe Portweiterleitung eingerichtet, so dass Jenkins von meiner externen IP-Adresse verwendet werden kann.
Ich habe das Bitbucket Plugin für Jenkins installieren: https://wiki.jenkins-ci.org/display/JENKINS/BitBucket+Plugin
ich mein Projekt mit den folgenden Einstellungen konfiguriert: SCM: Git:
Repository URL: https://$BitbucketUserName:[email protected]/mycompany/projectname.git
Credentials: Bitbucket Username und Pw
Branch Specifier: **master/
Build-Trigger:
Build when a change is pushed to Bitbucket checked
Poll SCM: */1 * * * *
Bitbucket: Ging zum Projekt - Webhooks.
Wenn ich zu diesem Repository dränge, kann ich sehen, dass ich eine 200 Response bekomme (erfolgreicher Beitrag zu Jenkins).
Die Bitbucket Log Drücken zeigt folgende Ausnahme:
Polling SCM changes on master
Using strategy: Default
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repositories
> git config remote.origin.url https://username:[email protected]/company/projectname.git # timeout=10
Fetching upstream changes from https://[email protected]/company/projectname.git
> git --version # timeout=10
using .gitcredentials to set credentials
> git config --local credential.username username # timeout=10
> git config --local credential.helper store --file=/Users/Shared/Jenkins/tmp/git7517617021208566630.credentials # timeout=10
> git -c core.askpass=true fetch --tags --progress https://[email protected]/companyname/projectname.git +refs/heads/*:refs/remotes/origin/*
ERROR: Timeout after 10 minutes
> git config --local --remove-section credential # timeout=10
FATAL: hudson.plugins.git.GitException: Failed to fetch from https://[email protected]/company/project.git
hudson.util.IOException2: hudson.plugins.git.GitException: Failed to fetch from https://[email protected]/company/project.git
at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:573)
at hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:381)
at hudson.scm.SCM.poll(SCM.java:398)
at hudson.model.AbstractProject.pollWithWorkspace(AbstractProject.java:1468)
at hudson.model.AbstractProject._poll(AbstractProject.java:1438)
at hudson.model.AbstractProject.poll(AbstractProject.java:1349)
at com.cloudbees.jenkins.plugins.BitBucketTrigger$1.runPolling(BitBucketTrigger.java:62)
at com.cloudbees.jenkins.plugins.BitBucketTrigger$1.run(BitBucketTrigger.java:87)
at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119)
at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: hudson.plugins.git.GitException: Failed to fetch from https://[email protected]/company/project.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:810)
at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:701)
at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:571)
... 14 more
Caused by: hudson.plugins.git.GitException: Command "git -c core.askpass=true fetch --tags --progress https://[email protected]/company/project.git +refs/heads/*:refs/remotes/origin/*" returned status code 143:
stdout:
stderr:
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1719)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1463)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:63)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:314)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:808)
... 16 more
Done. Took 45 Minuten
No changes
Als ich das Projekt erstellen manuell ich den Fehler, dass der Benutzername und das Passwort falsch sind, welche Art von unvereinbar ist. Manchmal schlägt es mit dem obigen Fehler fehl und manchmal versagt es zu sagen, dass mein Benutzername/Passwort falsch ist, was ich mehrmals überprüft habe.
Ich habe versucht, den Build manuell mit der "Trigger Build Remote" Prüfung zu starten und es beginnt zu bauen. Der Build schlägt immer noch fehl, während er versucht, Bitbucket zu holen.
Ich habe gesucht und gefunden, dass viele Leute bereits dieses Problem hatten. Die Antworten funktionieren jedoch nicht für mich.