turbo icon indicating copy to clipboard operation
turbo copied to clipboard

Cannot login from remote headless machine

Open matthewlilley opened this issue 2 years ago • 8 comments

What version of Turborepo are you using?

latest

What package manager are you using / does the bug impact?

Yarn v1

What operating system are you using?

Linux

Describe the Bug

Running on headless machine, fails to open local browser, or provide alternative to login.

Opening browser to https://vercel.com

Waiting for your authorization...

Expected Behavior

Be able to login

To Reproduce

Run on remote headless machien

matthewlilley avatar Jan 06 '22 14:01 matthewlilley

You can pass the --token flag for the token after getting it from Vercel.

Xenfo avatar Jan 07 '22 02:01 Xenfo

I wrote about this and opened a PR that fixes it client (but not server) side #479 and #480 respectively

JoeyEamigh avatar Jan 07 '22 23:01 JoeyEamigh

--token

Is this documented anywhere? There didn't seem to be optional params for login.

matthewlilley avatar Jan 09 '22 03:01 matthewlilley

--token

Is this documented anywhere? There didn't seem to be optional params for login.

https://turborepo.org/docs/reference/command-line-reference#--token

Also add in the --team option which is right below the --token option in the docs.

Xenfo avatar Jan 12 '22 02:01 Xenfo

Awesome @Xenfo - It might be useful to show the link in the terminal too when you run the login command.

matthewlilley avatar Jan 12 '22 07:01 matthewlilley

yes, it took me a while to search this --token part a Github Actions Example would be super useful

AlonMiz avatar Jan 29 '22 12:01 AlonMiz

It appears that you can pass a token to the build command, but not login. Most CLI apps will still allow me to login via CLI normally with web browser being opened on my host machine, but it just hangs for Turborepo, and eventually opens 20 browser windows, and confirming doesn't work.

Context: Ubunutu 18.04 server & removeSSH via VSCode.

I'll set the ENV for now but would be nice for login to work as expected in this setup :)

matthewlilley avatar Feb 03 '22 19:02 matthewlilley

To make this work we need to detect headless environments and then use our token echo page to handle out-of-band login: https://vercel.com/notifications/cli-login-oob

nathanhammond avatar Jul 27 '22 05:07 nathanhammond

Our CI examples show how to log in from headless environments using environment variables.

anthonyshew avatar Dec 05 '23 06:12 anthonyshew