mongodb-atlas-cli icon indicating copy to clipboard operation
mongodb-atlas-cli copied to clipboard

config.toml not getting updated with new values after doing atlas config init more than once

Open pawan-saxena opened this issue 3 years ago • 1 comments
trafficstars

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:

  1. Run 'atlas config init' multiple times
  2. 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)

pawan-saxena avatar Jul 19 '22 22:07 pawan-saxena

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 edit and see the config.toml file. 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.toml file that you're referring to? Is it possible you have mongocli also installed?

blva avatar Jul 20 '22 13:07 blva

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!

github-actions[bot] avatar Oct 18 '22 14:10 github-actions[bot]