-
Bug
-
Resolution: Unresolved
-
Major
-
Ubuntu 10.4.3 LTS Server
Maven 3.0.3
Git 1.7.0.4
Jenkins 1.424.1
M2Release Plugin 0.8.1
Git Plugin 1.1.15
When performing a release the final 'git clone' and 'git push' executed do not take the username:password defined in the scm's connection/developerConnection.
Scenario:
- git repository wrapped by gitblit to provide user authorization/authentication, thus we need to specify a user/pass to be able to fetch/push.
[pom.xml]
{{
<scm>
<connection>scm|git|http://ciuser:cipass@git.repo.url</connection>
<developerConnection>scm|git|[fetch=]http://ciuser:cipass@git.repo.url[push=]http://ciuser:cipass@git.repo.url</developerConnection>
</scm>
}}
jenkins job configutaion:
{{
SCM
Repository URL: http://ciuser:cipass@git.repo.url
Checkout/merge to local branch: master
Merge before build: checked
}}
log snippet:
{{
[INFO] Release preparation complete.
[INFO]
[INFO] Checking out the project to perform the release ...
[INFO] Executing: /bin/sh -c cd /opt/apps/jenkins/jobs/reksplatform-event-bus-model-release/workspace/target && git clone http://developers.myreks.com/gitblit/git/development/reksplatform-event-bus-model.git /opt/apps/jenkins/jobs/reksplatform-event-bus-model-release/workspace/target/checkout
[INFO] Working directory: /opt/apps/jenkins/jobs/reksplatform-event-bus-model-release/workspace/target
[INFO] — maven-release-plugin:2.0:perform (default-cli) @ reksplatform-event-bus-model —
[ERROR] The git-clone command failed.
[JENKINS] Archiving /opt/apps/jenkins/jobs/reksplatform-event-bus-model-release/workspace/pom.xml to /opt/apps/jenkins/jobs/reksplatform-event-bus-model-release/modules/com.myreks.event$reksplatform-event-bus-model/builds/2012-02-10_20-02-18/archive/com.myreks.event/reksplatform-event-bus-model/1.1.8-SNAPSHOT/reksplatform-event-bus-model-1.1.8-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.683s
[INFO] Finished at: Fri Feb 10 20:02:31 BRST 2012
[INFO] Final Memory: 6M/16M
[INFO] ------------------------------------------------------------------------
mavenExecutionResult exceptions not empty
message : Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0:perform (default-cli) on project reksplatform-event-bus-model: Unable to checkout from SCM
Provider message:
The git-clone command failed.
Command output:
error: The requested URL returned error: 401 while accessing http://git.repo.url/info/refs
fatal: HTTP request failed
cause : Unable to checkout from SCM
Provider message:
The git-clone command failed.
Command output:
error: The requested URL returned error: 401 while accessing http://git.repo.url/info/refs
fatal: HTTP request failed
Stack trace :
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0:perform (default-cli) on project reksplatform-event-bus-model: Unable to checkout from SCM
Provider message:
The git-clone command failed.
Command output:
error: The requested URL returned error: 401 while accessing http://git.repo.url/info/refs
fatal: HTTP request failed
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:122)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:74)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:287)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
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:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.maven.plugin.MojoFailureException: Unable to checkout from SCM
Provider message:
The git-clone command failed.
Command output:
error: The requested URL returned error: 401 while accessing http://git.repo.url/info/refs
fatal: HTTP request failed
at org.apache.maven.plugins.release.PerformReleaseMojo.execute(PerformReleaseMojo.java:139)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 27 more
Caused by: org.apache.maven.shared.release.scm.ReleaseScmCommandException: Unable to checkout from SCM
Provider message:
The git-clone command failed.
Command output:
error: The requested URL returned error: 401 while accessing http://git.repo.url/info/refs
fatal: HTTP request failed
at org.apache.maven.shared.release.phase.CheckoutProjectFromScm.execute(CheckoutProjectFromScm.java:171)
at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:343)
at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:289)
at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:269)
at org.apache.maven.plugins.release.PerformReleaseMojo.execute(PerformReleaseMojo.java:131)
... 29 more
channel stopped
Finished: FAILURE
}}
I'm not sure if the bug is in m2release, scm-git or jenkins itself, so I decided to post it here since you should have a broader vision of all these tools.