ajoberstar / reckon

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

ssh -> https authentication username/password credentials #123

Closed daggerok closed 4 years ago

daggerok commented 4 years ago

Hello,

In my organisation communication with github via ssh protocol is restricted. So It would be nice if you add some short documentation how to pass proper username/password auth for reckonTagPush` task via some system or gradle properties:

./gradlew reckonTagPush -Preckon.scope=minor -Preckon.stage=beta
> 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/daggerok/deventstore.git: Authentication is required but no CredentialsProvider has been registered

Thanks


Regards, Maksim

daggerok commented 4 years ago

I have done some reverse engineering and found this:

GRGIT_USER=somebody
GRGIT_PASS=myauthtoken

here: http://ajoberstar.org/grgit/index.html

should I create a specific to my repo token in github profile settings?

daggerok commented 4 years ago

finally fond this: http://ajoberstar.org/grgit/grgit-authentication.html will try that...

daggerok commented 4 years ago

Okay, I can confirm, that next command works:

./gradlew reckonTagPush -Preckon.scope=minor -Preckon.stage=beta \
  -Dorg.ajoberstar.grgit.auth.username=daggerok \
  -Dorg.ajoberstar.grgit.auth.password=cretes
Reckoned version: 0.1.0-beta.1

I think question can be closed...


Regards