turbo
turbo copied to clipboard
Cannot login from remote headless machine
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
You can pass the --token flag for the token after getting it from Vercel.
I wrote about this and opened a PR that fixes it client (but not server) side #479 and #480 respectively
--token
Is this documented anywhere? There didn't seem to be optional params for login.
--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.
Awesome @Xenfo - It might be useful to show the link in the terminal too when you run the login command.
yes, it took me a while to search this --token
part
a Github Actions Example would be super useful
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 :)
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
Our CI examples show how to log in from headless environments using environment variables.