asfaload-cli register-repo
- Usage:
asfaload-cli register-repo [OPTIONS] -K <SECRET_KEY> <SIGNERS_FILE_URL> - Source:
src/commands/register_repo.rs
Register a new repository with the backend. Points the backend at your signers file so it knows which keys are authorized to sign artifacts for this project.
After registration, all signers listed in the file must submit their signatures to activate the project.
Arguments
<SIGNERS_FILE_URL>
Public URL to the signers file on the forge. For example:
https://raw.githubusercontent.com/owner/repo/main/asfaload.signers/index.json
Options
-K --secret-key <PATH>
Path to your secret key file. Required.
-p --password <PASSWORD>
Password for the secret key. Conflicts with --password-file and --password-command. Prompted interactively if none of these is set.
-P --password-file <PATH>
File containing the password. Conflicts with --password and --password-command.
-c --password-command <COMMAND>
Shell command to run; its standard output is read as the password. Useful for password managers (pass, op, bw, etc.). Conflicts with --password and --password-file. The command string is parsed with shell-style quoting (no shell is spawned, so pipes and redirections don’t apply); trailing newlines are stripped from the output.
-u --backend-url <URL>
Backend API URL. Defaults to http://127.0.0.1:3000.
--json
Emit output as JSON instead of human-readable text.
Environment
ASFALOAD_REGISTER_REPO_PASSWORD— alternative to--password.ASFALOAD_REGISTER_REPO_PASSWORD_FILE— alternative to--password-file.
Output
Human-readable (default):
Repository registered successfully!
Project ID: abc123
Required signers (2): alice, bob
Next step: signers must submit signatures to activate the project.
JSON (with --json):
{"success":true,"project_id":"abc123","required_signers":["alice","bob"],"message":""}
Examples
# register a GitHub-hosted signers file
asfaload-cli register-repo -K ~/.asfaload/key \
https://raw.githubusercontent.com/acme/tool/main/asfaload.signers/index.json
# with explicit backend
asfaload-cli register-repo -K ~/.asfaload/key \
-u https://asfaload.example.com \
https://raw.githubusercontent.com/acme/tool/main/asfaload.signers/index.json
Exit codes
0— repository registered.- non-zero — error (authentication failure, invalid signers file URL, network error).