N
Neon6mo ago
ratty-blush

neonctl auth in a VM?

I can't be the first person to install neonctl in a virtual machine. When I run neonctl auth, it tries to spawn the browser and fails. I can manually enter the URL into my browser, but then it redirects to 127.0.0.1 but there is of course nothing running there. Additionally, neonctl seems to crash after failing to spawn the browser so there's nothing listening there either, and invoking the target URL in the VM via curl or wget fails.
3 Replies
ratty-blush
ratty-blushOP6mo ago
OK, I resolved this by uninstalling the Linux binary I had downloaded and installing the nodejs version instead. Then neonctl auth just prompted me to open the URL and stayed running. Then I could use wget to complete the auth.
ambitious-aqua
ambitious-aqua6mo ago
you can also use the --api-key option instead of the auth flow: https://neon.tech/docs/reference/cli-auth#usage
Neon
Neon CLI commands — auth - Neon Docs
Before you begin. Before running the auth command, ensure that you have installed the Neon CLI. The auth command. Authenticates the user or caller to Neon. Usage. The command launches a browser window...
ratty-blush
ratty-blushOP6mo ago
If I use --api-key then I get "ERROR: user has no access to projects" if I specify --project-id <project>

Did you find this page helpful?