Esta página aún no está traducida al español. Leer la versión en inglés

Accounts, tokens and authors

Publish on www.antril.org - sign up, own author names, make API tokens for larva hive publish, and revoke them.

Última actualización: 3 min de lectura Editar en GitHub

En esta página

Installing packages needs no account. Publishing to the www.antril.org registry needs three things: an account, an author you own (the first part of Author/Name) and an API token that larva hive publish sends for you.

Page What you do there
/account/register Sign up.
/account/login Log in, with your user name or email.
/account See the authors you own and claim new ones.
/account/tokens Create and revoke API tokens.

Sign up

On www.antril.org/account/register, choose:

  • a user name: 2 to 64 characters (letters, digits, - and .), starting with a letter or digit. It is also your first author: a user named Ana publishes Ana/Greetings. It cannot be a name that is taken or reserved;
  • an email, one per account;
  • a password of at least 10 characters, with upper and lower case letters and a digit.

Then choose Create account: you are signed in, and your author exists.

After five wrong passwords in a row, logging in is locked for 10 minutes.

Authors

An author is a namespace: every package is Author/Name, and only the author's owners may publish under it. Your account page lists the authors you own, whether each is personal (your user name) or an organization, and their packages.

To publish under another name, such as your organization's, claim it on /account: type the name and choose Claim. An author name has 1 to 64 letters, digits, -, _ or ., starts with a letter or digit, and must be free:

  • names are unique regardless of case: if Ana exists, nobody can claim ana;
  • some names are reserved, such as Antril, Antril-Organization, Larva and Hive: the site's administrators give them out.

A package is written with its author's exact capitals: publishing ana/Greetings when the author is Ana is refused with the author is written `Ana` .

An author has owners only; adding other people to an author is not yet available.

API tokens

A token lets tools act as you. Today it does one thing: publish packages under the authors you own.

  1. On /account/tokens, give the token a name (where it is used, such as laptop or build-server) and when it expires: in 30 days, 90 days, a year, or never.

  2. Choose Create token. The token, hive_ followed by 43 characters, is shown once: copy it then. The site keeps only its SHA-256 and cannot show it again.

  3. Give it to larva in the HIVE_TOKEN environment variable:

    PowerShell:  $env:HIVE_TOKEN = "hive_..."
    bash:        export HIVE_TOKEN=hive_...
    

    then publish:

    larva hive publish
    

The tokens page lists each token with its name, its first characters, when it was created and last used, and whether it is active, expired or revoked. You can have up to 25 active tokens.

Treat a token as a password: keep it out of your sources and out of scripts you share. On a build server, store it as a secret and set HIVE_TOKEN from it.

Revoke a token

On /account/tokens, choose Revoke next to the token. It stops working at once: a publish with it answers 401. Revoke a token as soon as you think someone else has seen it, and make a new one.

Who can publish what

You want to publish You need
YourName/Package Your account and a token.
Your-Organization/Package To own the author Your-Organization (claimed on /account) and a token.
A new version of an existing package The above, and the package's signing key (see Signing and keys).

The registry's answers when something is missing are in The registry API.

¿Te resultó útil esta página?

No se guarda ninguna dirección; tu nombre de usuario sí, si iniciaste sesión.

Esc