Connect the CLI
Sign the erden CLI in to the registry by approving a short code in the browser, and sign it out again.
Who needs this, and when
Who: anyone who publishes, depends on private layers, or queries from a terminal. When: once per computer
and registry, and again after erden logout. Status: always available.
The CLI never sees your password. Instead it shows a short code, you approve that code in a browser where you are signed in, and the registry gives the CLI its own credential. The credential works only for that one registry.
Start the login in your terminal
erden login --registry https://registry.erden.shUse the hosted registry address, https://registry.erden.sh, which is also what the CLI uses when no registry is named. Inside a project whose manifest names a registry, plain erden login is enough.
What you should see: the CLI prints a link and a code, then waits:
$ erden login --registry https://registry.erden.sh
Open https://erden.sh/api/v1/auth/device?user_code=WXYZ-2345 and enter code WXYZ-2345Open the link in your browser
Click or copy the link. If you are not signed in, the registry asks you to sign in first and then continues.
Approve the request
Check that the code matches the one in your terminal, then press Approve.
Press Deny if you did not start this login yourself.
Check both sides
In the browser you are back on your account page:
In the terminal, the CLI finishes by itself:
$ erden login --registry https://registry.erden.sh
Open https://erden.sh/api/v1/auth/device?user_code=WXYZ-2345 and enter code WXYZ-2345
Logged in to https://registry.erden.shWhat you should see
The device request was approved. in the browser and Logged in to the registry in the terminal.
Enter the code by hand
If the link doesn't open, go to your account page, click Review a CLI device request, type the eight-character code from your terminal, and press Continue. Then approve as above.
Sign the CLI out
erden logout --registry https://registry.erden.sh$ erden logout --registry https://registry.erden.sh
Logged out from https://registry.erden.shThis revokes the credential on the registry and deletes the local copy.
If it looks different
The code has expired
A login request lasts about ten minutes. Run erden login again for a fresh code.
erden login doesn't know which registry to use
Outside a project, the CLI uses https://registry.erden.sh unless you pass --registry. Inside a project, add "registry" to the
manifest (see Publish your first ontology).
A certificate error, or a warning about http
See the troubleshooting notes in Install the CLI.