You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any error messages related to parsing the config file (those) aren't printed.
Expected behavior
Helpful error messages why the config is ignored
Environment
Go Version:
Ionosctl version:
6.8.0
OS:
Ubuntu 24.04
Shell:
bash
Configuration Files
Anything that is considered invalid, e.g. invalid JSON or wrong permissions.
How to Reproduce
$ echo '{"userdata.token":"foo"}' > /tmp/ionosctl.json
$ chmod 0600 /tmp/ionosctl.json
$ ionosctl --config /tmp/ionosctl.json whoami --provenance
Note: Authentication failed!
Authentication layers, in order of priority:
[1] Global Flags (--token)
[2] Environment Variables (IONOS_TOKEN, IONOS_USERNAME, IONOS_PASSWORD)
* [3] Config file settings (userdata.token, userdata.name, userdata.password) (USED)
- Using token for authentication.
- Using https://api.ionos.com as the API URL.
$ chmod 0640 /tmp/ionosctl.json
Note: Authentication failed! None of the authentication layers had a token, or both username & password set.
Authentication layers, in order of priority:
[1] Global Flags (--token)
[2] Environment Variables (IONOS_TOKEN, IONOS_USERNAME, IONOS_PASSWORD)
[3] Config file settings (userdata.token, userdata.name, userdata.password)
That last command should have said "failed config file permissions check: invalid permissions for /tmp/ionosctl.json: expected 0600, got 0640"
Hi, thank you for bringing this up and apologies for the slow response! We've looked into it and we will include some additional error outputs in order to make debugging config file authentication easier.
Description
Any error messages related to parsing the config file (those) aren't printed.
Expected behavior
Helpful error messages why the config is ignored
Environment
Go Version:
Ionosctl version:
OS:
Shell:
Configuration Files
Anything that is considered invalid, e.g. invalid JSON or wrong permissions.
How to Reproduce
That last command should have said "failed config file permissions check: invalid permissions for /tmp/ionosctl.json: expected 0600, got 0640"
Error and Debug Output
Additional Notes
References
I think you're dropping the generated error here
The text was updated successfully, but these errors were encountered: