From 92bc7caf7aaf6975b728f3159ba43209ef61436e Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Sun, 9 Sep 2018 19:21:48 +0200 Subject: [PATCH] Reword missing credentials error msg (#6418) Enhance a little bit the error message that is showing when access & secret keys are not specified in the environment when running Minio in gateway and server mode. This commit also removes a redundant check of access/secret keys. --- cmd/server-main.go | 2 +- cmd/ui-errors.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/server-main.go b/cmd/server-main.go index ccfce32e3..b63b5b4ed 100644 --- a/cmd/server-main.go +++ b/cmd/server-main.go @@ -271,7 +271,7 @@ func serverMain(ctx *cli.Context) { logger.Info(`Supplying credentials from your 'config.json' is **DEPRECATED**, Access key and Secret key in distributed server mode is expected to be specified with environment variables MINIO_ACCESS_KEY and MINIO_SECRET_KEY. This approach will become mandatory in future releases, please migrate to this approach soon.`) } else { // Credential is not available anywhere by both means, we cannot start distributed setup anymore, fail eagerly. - logger.Fatal(uiErrEnvCredentialsMissingServer(nil), "Unable to initialize distributed Minio server.") + logger.Fatal(uiErrEnvCredentialsMissingDistributed(nil), "Unable to initialize the server in distributed mode") } } } diff --git a/cmd/ui-errors.go b/cmd/ui-errors.go index b6f7d1ded..d6d22f878 100644 --- a/cmd/ui-errors.go +++ b/cmd/ui-errors.go @@ -74,14 +74,14 @@ Secret key should be in between 8 and 40 characters.`, uiErrEnvCredentialsMissingGateway = newUIErrFn( "Credentials missing", - "Please provide correct credentials", - `Access key and Secret key should be specified in Gateway mode from environment variables MINIO_ACCESS_KEY and MINIO_SECRET_KEY respectively.`, + "Please set your credentials in the environment", + `In Gateway mode, access and secret keys should be specified via environment variables MINIO_ACCESS_KEY and MINIO_SECRET_KEY respectively.`, ) - uiErrEnvCredentialsMissingServer = newUIErrFn( + uiErrEnvCredentialsMissingDistributed = newUIErrFn( "Credentials missing", - "Please provide correct credentials", - `Access key and Secret key should be specified in distributed server mode from environment variables MINIO_ACCESS_KEY and MINIO_SECRET_KEY respectively.`, + "Please set your credentials in the environment", + `In distributed server mode, access and secret keys should be specified via environment variables MINIO_ACCESS_KEY and MINIO_SECRET_KEY respectively.`, ) uiErrInvalidErasureEndpoints = newUIErrFn(