Fix exception messages to hint about how to fix using command line args; fixes #63

This commit is contained in:
Marcin Grzejszczak
2017-11-28 12:55:05 +01:00
parent 96f4aed896
commit 981e5a1b50
3 changed files with 18 additions and 5 deletions

View File

@@ -20,7 +20,8 @@ class SaganConfiguration {
}
private RestTemplate restTemplate(ReleaserProperties properties) {
Assert.hasText(properties.getGit().getOauthToken(), "In order to connect to Sagan you need to pass the Github OAuth token");
Assert.hasText(properties.getGit().getOauthToken(), "In order to connect to Sagan you need to pass the Github OAuth token. "
+ "You can do it via the [--releaser.git.oauth-token=...] command line argument or an env variable [export RELEASER_GIT_OAUTH_TOKEN=...].");
return new RestTemplateBuilder()
.basicAuthorization(properties.getGit().getOauthToken(), "")
.build();