authzed/zed

Run on Headless Ubuntu / Debian

c-thiel opened this issue · 6 comments

I just tried to install zed on Ubuntu / Debian headless via homebrew and the .deb package.
Unfortunately upon running zed context set local localhost:50051 "somerandomkeyhere" --insecure I get a promt to set a keyring password. Well, I have never set a password and am not using Keyring.

The output I get is:

Entering your password a lot? Try setting the environment variable `ZED_KEYRING_PASSWORD`
Enter passphrase to unlock "/home/XYZ/.zed/keyring.jwt":

I don't now the password though as I have never set it and entering nothing or a random string all leads to an error.

I would expect the documentation to work which just states for macOS and Linux:

brew install zed
zed context set local localhost:50051 "somerandomkeyhere" --insecure
zed schema read --insecure

https://authzed.com/docs/spicedb/installing#running-via-brew

This might be related to #140.

If keyring is required, this would basically make zed useless in any headless setup I believe.

I think this happens sometimes if you ^C or just press enter without any input on the first time you're prompted for the password.

Does this work if you delete the $HOME/.zed directory and try again?

Hi @jzelinskie, thanks for the prompt response.
Yes, it also happens when I delete the folder:

rm -rf ~/.zed/
zed context set local localhost:50051 "somerandomkeyhere" --insecure
Entering your password a lot? Try setting the environment variable `ZED_KEYRING_PASSWORD`
Enter passphrase to unlock "/home/XYZ/.zed/keyring.jwt":

Oh! I think I realized the issue -- the first time zed prompts you for a password is actually the time it's setting the password.

We should probably detect if that's the case and change the text in the prompt so that it's clear.

If you confirm that's the case, I'll open up a PR with a fix.

Oh yes, that actually seems to be the issue. Thanks!

Any solution to this? I'm using WSL2 on Windows, and have just installed zed.
Running the first command from the manual is already a problem, exactly like the author described, except that no matter what I type in, it just re-prompts for pwd 3 times and then exits

krosn commented

Any solution to this? I'm using WSL2 on Windows, and have just installed zed. Running the first command from the manual is already a problem, exactly like the author described, except that no matter what I type in, it just re-prompts for pwd 3 times and then exits

I got around this for now by setting the removing the ~/.zed directory, setting the environment variable, and then running the "zed context set ..." command again.

Though I was also able to get it working by just clearing the directory and specifying a new password like jzelinskie mentioned. You just need to re-enter the same password each time (it's set the first time).

For context, I am also using WSL2 on windows.