Skip to content

"mc alias set ..." error and referenced material lacks the information required to resolve the error #5243

@sen-io

Description

@sen-io

Expected behavior

If I'm told a command value is invalid, I should be told why

Actual behavior

When running mc alias set minio http://localhost:9005 senyo senyo I received the error:

mc: Invalid secret key senyo. Invalid arguments provided, please refer mc <command> -h for relevant documentation.

Unfortunately the help (-h) command does not show information that informs me why the secret key I provided is invalid.

Through experimentation I discovered that it was the length of the string that was not acceptable (looks like a certain number of characters are required), but in cases like this, if we show an error saying a string is not valid, we should let the user know why. Also, when looking in our docs page , I did not see any mention of secret key requirements either.

Steps to reproduce the behavior

Run mc alias set minio http://localhost:9005 admin tiny

mc --version

mc version RELEASE.2024-02-24T01-33-20Z (commit-id=f17313e7ab892fa5c7561a63296b68c1691f9b2b)
Runtime: go1.21.7 darwin/arm64
Copyright (c) 2015-2024 MinIO, Inc.
License GNU AGPLv3 https://www.gnu.org/licenses/agpl-3.0.html

System information

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions