hull login
Store credentials for a package registry so later pushes and pulls to that host authenticate automatically.
When to use it
- Before you
hull publish,hull pull, orhull registry pushagainst a registry that requires authentication. - Once per host — the credential is saved and reused until you
hull logout. - To record, per host, that you accept an untrusted transport (
--insecure).
What happens
- You give a
<host>(e.g.registry.example.com) and one credential: a username/password pair, a bearer--token, or an--api-key. - hull writes the credential to
~/.config/hull/credentials.json, keyed by host. The file is created mode0600and its parent directory0700, so other users on the machine cannot read it. - It prints
Login succeeded for <host>. - From then on, commands that talk to that host (
publish,pull,registry push/pull) attach the stored credential — you do not pass it again.
Supply exactly one credential type. If more than one is given, hull uses the bearer token first, then the API key, then basic auth.
Usage
hull login <host> [flags]
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
-u, --username |
string | — | username for basic auth; pair with --password |
-p, --password |
string | — | password for basic auth |
--password-stdin |
— | — | read the password from stdin instead of --password (the two are mutually exclusive) — keeps it out of shell history and process listings |
--token |
string | — | bearer token, sent as Authorization: Bearer <token> |
--api-key |
string | — | API key credential |
--insecure |
— | — | record that this host may be reached over an untrusted transport (skip TLS verification / allow plain HTTP) |
Relevant global flags:
| Flag | Type | Description |
|---|---|---|
--allow-plaintext-auth |
— | permit sending credentials over plaintext HTTP; otherwise hull refuses |
--debug |
— | enable debug output |
Worked example
Log in with basic auth, then publish — the upload authenticates with no extra flags:
hull login registry.example.com -u alice -p s3cret
Login succeeded for registry.example.com
hull publish ./my-app-1.0.0.hull.tgz --repo https://registry.example.com
Published my-app@1.0.0 to https://registry.example.com
Keep the password off the command line by piping it in:
echo "$REGISTRY_PASSWORD" | hull login registry.example.com -u alice --password-stdin