Skip to content
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

Allow for cloud login to complete without a browser #397

Open
rio opened this issue Apr 22, 2024 · 3 comments
Open

Allow for cloud login to complete without a browser #397

rio opened this issue Apr 22, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@rio
Copy link

rio commented Apr 22, 2024

Currently the cli assumes that it can open a browser on the user's behalf when running cloud login which almost always not available in CI environments. Unless I'm missing some configuration option, it seems a --open-browser=false flag would be desirable to facilitate CI workflows or other use cases where access to xdg-open or other ways of opening a user's browser is not available.

@rio rio added enhancement New feature or request triage Needs triage labels Apr 22, 2024
@demeyerthom
Copy link
Contributor

demeyerthom commented Apr 23, 2024

@rio you can set MCC_CLIENT_ID and MCC_CLIENT_SECRET to override this logic entirely. If those are set it will authenticate on its own. We run the CLI in the pipeline in the same way.

The credentials can be found on the MC Cloud Dashboard under settings. See https://docs.machcomposer.io/cloud/getting-started.html also

@demeyerthom demeyerthom removed the triage Needs triage label Apr 23, 2024
@rio
Copy link
Author

rio commented Apr 23, 2024

I knew I was missing something ;)

Still, it would be healthy to just print the URL and wait for the auth code if it was unable to open the browser.
I might whip up something but I'm a bit swamped currently.

I'll leave this open for now.

@demeyerthom
Copy link
Contributor

That is fair, if we have no creds set and don't open a browser we should just error out instead. That way at least the user knows what is going on. If you want to take a look feel free, I will otherwise set it on the backlog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants