ajoberstar / reckon

Infer a project's version from your Git repository.
Apache License 2.0
185 stars 28 forks source link

Can't push tag from plugin #122

Closed eshepelyuk closed 4 years ago

eshepelyuk commented 4 years ago

When calling

$ ./gradlew -Preckon.scope=patch -Preckon.stage=final reckonTagPush

Following error is printed

/d/projects/gradle-gatling-plugin (master)
$ ./gradlew -Preckon.scope=patch -Preckon.stage=final reckonTagPush

> Configure project :
Reckoned version: 3.1.5

> Task :reckonTagCreate
> Task :reckonTagPush FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':reckonTagPush'.
> org.eclipse.jgit.api.errors.TransportException: https://github.com/lkishalmi/gradle-gatling-plugin.git: Authentication is required but no CredentialsProvider has been registered

Although git push origin ... works.

Although was unable to find in docs how to add this CrendentialsProvider

daggerok commented 4 years ago

Hello, your problem is:

TransportException: https://github.com/lkishalmi/gradle-gatling-plugin.git: Authentication is required but no CredentialsProvider has been registered

ie: no CredentialsProvider has been registered

either use ssh origin (https://github.com/lkishalmi -> git@github.com:lkishalmi) or pass github authentication like so:

./gradlew -Preckon.scope=patch -Preckon.stage=final reckonTagPush \
  -Dorg.ajoberstar.grgit.auth.username=lkishalmi \
  -Dorg.ajoberstar.grgit.auth.password=$yourGithubPassword

you can find more info here also see: https://github.com/ajoberstar/reckon/issues/123


cheers

ajoberstar commented 4 years ago

Thanks @daggerok! Yes, @eshepelyuk the doc he linked to covers all auth options supported by Grgit (used by Reckon). Please re-open if this doesn't resolve the issue for you.