Open broth-eu opened 7 years ago
I think this may be related to configuring git. Are you able to push tags manually from the command-line using git by itself?
Yes, pushing from command-line works as expected. Currently, my workaround is to push the newly created version tag by invoking the according git command.
I'll look into this a bit more. It might be related to the way JGit does things. I vaguely remember running into a similar issue before.
@broth-eu Are you trying to push to github? Or is it some other git repo? What sort of authentication are you using?
I'm trying to push to a BitBucket cloud repo. I always authenticate using username and password. Windows provides both using its credential manager.
I see; so every time you push, you provide your username and password?
I think a way around this is to be able to provide authentication information to the plugin and configure the credentials holder that way.
Sorry I've been really busy the past few months. Will try to look at this again.
I get the same error when this is run from TravisCI:
:tag FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':tag'.
> org.eclipse.jgit.api.errors.TransportException: https://github.com/example-org/my-repo.git: Authentication is required but no CredentialsProvider has been registered
How do you?
provide authentication information to the plugin and configure the credentials holder
I fixed this in my use case for travisCI by pushing the tag separately:
script: ./gradlew printVersion tag -Prelease && git push "https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git" --tags
I'm trying to fix another issue currently, but will look at this again. I'm not sure why it isn't pulling in auth settings.
I am having the same problem with gitlab and the git server and the CI server are the same. I had to do something similar to kazvictor.
When I invoke task
tag
with option--push
, I always get the following error: Authentication is required but no CredentialsProvider has been registeredHow do I need to specify my credentials for the remote git repository?