-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure server connections by URI #5
Comments
To be more clear about the use case I'm hoping for... It would be great to be able to use |
Hello! Unfortunately, mongoctl does not exactly have what you described. Good news is that it has something that is not too far from that. It is not fully documented though. Using the connect command, you can connected to your database using something like:
Now If you set your database credentials in the "seedUsers" property of your mongoctl server config, then just passing your username through "-u" would be enough. mongoctl will automatically lookup the password from your "seedUsers" property and provide it to connect. So in your server config set "seedUsers" as follows:
So this should work without needing to supply the password. I hope this helps and apologies for the late reply. Sincerely, -abdul |
I was hoping for this as well, and it is ironic that I can't use mongoctl to connect to my mongo server hosted by mongolab as easily as I can to connect to my own self-managed mongo servers. Would it be possible to configure a 'default user', so you don't need to specify the user every time either? |
We are not planning for that unfortunately :( I suggest using an alias instead. |
I was tired of doing this conversion by hand so I made a tiny tool to do this myself. http://www.mongo.click/ |
I think this is an enhancement request, or else I just can't figure out your docs.
The reason I started using mongoctl was so that I could connect to my mongo servers using the
mongodb://
uri instead of parsing it into {host, port, username, password, database} every time. But when setting up.mongoctl/servers.config
I can't use the URI but need to parse it manually.The text was updated successfully, but these errors were encountered: