mongodb-atlas-cli
mongodb-atlas-cli copied to clipboard
config.toml not getting updated with new values after doing atlas config init more than once
I did initialize the atlas using : atlas config init.
I got the profile created successfully.
Then I noticed the config I did put was wrong. So I did atlas config init several times and found that the config.toml was not getting updated with new values.
To Reproduce Steps to reproduce the behavior:
- Run 'atlas config init' multiple times
- See : 'There was an error fetching your organizations: You are not authorized for this resource.'
Expected behavior The corresponding output should come on console for the atlas commands being run after it is being initialised with correct config multiple times
**Desktop
- MacOS Monetery (v12.3.1)
- atlas CLI (v 1.1.4)
Hi!
Thanks for reporting this issue.
Potential fixes:
- You can edit the specific wrong configuration as opposed to run init. For example, if the org id is wrong, you can try
atlas config edit set org_id <new_id_value>- docs. - Run
atlas config editand see theconfig.tomlfile. All the values should be in[default]profile. You should be able to erase all the values there to try running config init again.
Reproducing the issue: To help me reproducing this issue, could you please provide the following:
- What is your authentication method? Did you run atlas login or did you set API keys through
atlas config init? - What are the values in the config that are wrong?
- What is the path of
config.tomlfile that you're referring to? Is it possible you have mongocli also installed?
This issue has gone 30 days without any activity and meets the project’s definition of "stale". This will be auto-closed if there is no new activity over the next 30 days. If the issue is still relevant and active, you can simply comment with a "bump" to keep it open, or add the label "not_stale". Thanks for keeping our repository healthy!