nebula-release-plugin icon indicating copy to clipboard operation
nebula-release-plugin copied to clipboard

git-receive-pack not permitted when running candidate task with 16.0.0

Open jvmlet opened this issue 3 years ago • 4 comments

We are migrating our project from nebula-release-plugin:13.0.0 to 16.0.0 and gradle 7.2 Previous branch based on nebula release 13.0.0 and gradle 6.8 runs just fine, but with 16.0.0 we are getting

org.eclipse.jgit.api.errors.TransportException: https://[email protected]/xxx/gradle-relese-test.git: git-receive-pack not permitted on 'https://[email protected]/xxxx/gradle-relese-test.git/'
 

We are propagating the credentials via GRGIT_USER and GRGIT_PASS environment variables, they ARE being picked up since I see using hardcoded credentials from system properties log message when adding --info option, the user is defined as project owner in gitlab.

Please advice

jvmlet avatar Oct 26 '21 08:10 jvmlet

Found the culprit. We are also using gradle-git-properties plugin, during migration it was upgraded to the latest 2.3.1, which brings grgit-core:4.1.0. 4.1.0 causes this failure with nebula-release-plugin:16.0.0. Downgraded gradle-git-properties to 2.2.3 and our release process is back to normal. Please support grgit-core:4.1.0

jvmlet avatar Oct 27 '21 09:10 jvmlet

Having the exact same problem and can't resolve. Any updates here?

Mine stems from having Nebula and se.bjurr.gitchangelog.git-changelog-gradle-plugin in the same build. When running in GitLab, I get the same "git-receive-pack not permitted" error. However, running locally, everything works fine...

WilliamsDL avatar Aug 30 '22 22:08 WilliamsDL

@WilliamsDL It's because GitLab does the clone with the password and user in the URL, so the remote URL contains it, which in turn overrides the credentials passed by grgit. I just spent two days to debug this. Workaround: sed -i -e "s/\(.*\):\/\/.*:.*@\(.*\)/\1:\/\/\2/" .git/config

ahoka avatar Dec 23 '22 09:12 ahoka

This seems to pop out more often. Our case was to have a spring-cloud-contract-gradle-plugin, which included newer version of the jgit library then the one used in grgit coming from nebula.release. For gradle builds you can check by running ./gradlew buildEnvironment The workaround from @ahoka worked as well.

tszala avatar Apr 06 '23 06:04 tszala