Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jvmlet opened this issue Oct 26, 2021 · 4 comments
Open

Comments

@jvmlet
Copy link

jvmlet commented Oct 26, 2021

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
Copy link
Author

jvmlet commented Oct 27, 2021

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

@WilliamsDL
Copy link

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...

@ahoka
Copy link

ahoka commented Dec 23, 2022

@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

@tszala
Copy link

tszala commented Apr 6, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants