ErdenDocs
Getting started

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.sh

Use 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-2345

Click or copy the link. If you are not signed in, the registry asks you to sign in first and then continues.

The Sign in page, reached from the CLI's link while signed out
Opening the CLI's link while signed out leads to the sign-in page first.

Approve the request

Check that the code matches the one in your terminal, then press Approve.

The Approve CLI access page: a client identified as erden-cli/v1 is waiting, status pending, with Approve and Deny buttons
Review the waiting CLI request, then approve it.

Press Deny if you did not start this login yourself.

Check both sides

In the browser you are back on your account page:

The account page showing The device request was approved.
Approved. The waiting CLI finishes signing in by itself.

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.sh

What 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.

The Review a CLI device request page with the code WXYZ-2345 entered and the Continue button
The device page, with the code the CLI printed.

Sign the CLI out

erden logout --registry https://registry.erden.sh
$ erden logout --registry https://registry.erden.sh
Logged out from https://registry.erden.sh

This 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.

Next

On this page