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

"force" option/parameter for provided tasks to allow pushing of tags to protected branch #242

Open
nikola-zapryanov-db opened this issue Oct 11, 2023 · 0 comments

Comments

@nikola-zapryanov-db
Copy link

nikola-zapryanov-db commented Oct 11, 2023

I'm trying to configure this plugin for my java app, but my "main" branch is protected. Running "./gradlew final" involves a git push at some point, to get the tags back to origin. However, even when ran on a branch, the task still tries to push against main and I get a TransportException.

Execution failed for task ':release'.
Error: [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > org.eclipse.jgit.api.errors.TransportException: https://github.com/<org>/<repo-name>: connection failed

I tried a manual force push from my local machine

git push -f origin --tags

which managed to get through. I checked the documentation but couldn't find a list of accepted parameters (such as the -Prelease.scope) listed anywhere, so I'm unsure if what I'm after already exists.

Basically, I need a way to tell the "final" task (or any other) to use "-f" when executing. Is that available, or could it be implemented?

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

1 participant