axion-release-plugin
axion-release-plugin copied to clipboard
[intermittent error] - "cannot open git-receive-pack" when markNextVersion gradle task try to push the new versioning
I have the following configuration in my build.gradle file:
plugins { id 'war' id 'jacoco' id 'eclipse' id 'org.sonarqube' version '3.2.0' id 'com.jfrog.artifactory' version '4.21.0' id 'maven-publish' id 'com.github.sahara3.tomcat-runner' version '0.2.1' id 'project-report' id 'org.hidetake.ssh' version '2.10.1' id 'pl.allegro.tech.build.axion-release' version '1.13.2' id "org.ajoberstar.grgit" version "4.0.2" } sourceCompatibility = 1.8
ext { repoUserName="myUserName" repoPassword="myPassword" }
scmVersion { useHighestVersion = true //Uncomment if you do not want push to remote //localOnly = true tag { prefix = 'v-' initialVersion = { t, p -> return '5.1.0' } } repository { customUsername = repoUserName customPassword = repoPassword } hooks { pre 'commit', {v, p -> "Changing release version to $v"} post 'push' } nextVersion { //suffix = rc/prod //separator = '-' } checks { //Uncomment if you do not want verify any of these items uncommittedChanges = false aheadOfRemote = false snapshotDependencies = false } } When I run ./gradlew markNextVersion, I receive the following error:
Task : FAILED Exception occurred during push: org.eclipse.jgit.api.errors.TransportException: http://my.repo.com/dev/project.git: cannot open git-receive-pack
Hi, cannot open git-receive-pack is a git error, are you using a custom git server with self-signed certificates maybe?
Hi @bgalek we are using a custom Enterprise Git Lab server without self-signed certificates. At the moment we have not enabled the Git Lab server to access via https. Can the intermittence of the error may be related to the SSL configuration?. if the answer is affirmative. Is there some configuration at the axion plugin level to avoid having to configure SSL in the git lab server?
I think that underlaying library accepts only https protocol, If you want to enable non-ssl communication you should dig into jgit docs. BTW its 2021' so I would really recommend to use secured connection ;)
Thank you @bgalek, I will take your advice :). It is still working fine for the release task anyway, and only fails sporadically with the markNextVersion task. Could you please confirm if the underlaying library really only accepts https protocols?