osmates credential add
Add a credential, reading its value from standard input or the terminal.
osmates credential add [<options>] <name>--host hosts take the value in --header, after --prefix if given, or in --query; --basic-host hosts take it as Basic authentication's password, beside the user the program in the machine names. One credential can do both, as Basic on github.com and a header on api.github.com. The value has 8 to 8192 bytes, without control characters in a header or Basic.
Arguments
<name>RequiredIts name: lower-case letters, digits, hyphens and underscores.
--host <host[:port]>RepeatableA host that takes the value in --header or --query; repeat for more.
--header <field>The header field the value goes in, such as Authorization.
--prefix <text>What comes before the value in the header, such as "Bearer ".
--query <parameter>The query parameter the value goes in.
--basic-host <host[:port]>RepeatableA host that takes the value as Basic authentication's password; repeat for more.
--variable <variable>The variable the machine's programs find the placeholder in.
--jsonPrint machine-readable JSON.
JSON output
With --json, it prints an object with these fields.
JSON Schema: /schemas/0/cli/credential/add.json
changedAtstring (date-time)RequiredcreatedAtstring (date-time)Requiredgrantsarray of objectsRequiredgrants[].activebooleanRequiredgrants[].endedobjectgrants[].expiryobject or stringRequiredOne of
machineStop,never, or an object that holds one key:at.grants[].grantedAtstring (date-time)Requiredgrants[].includesClonesbooleanRequiredgrants[].machinestringRequiredgrants[].machineIDstring (uuid)Requiredgrants[].placeholderstringRequiredidstring (uuid)RequirednamestringRequiredusesarray of objectsRequireduses[].hostobjectRequireduses[].placeobject or stringRequiredOne of
basic, or an object that holds one key:headerorquery.variablestring
Fields nested deeper are in the schema.
Exit statuses
Its exit status is one of these.
| Status | Meaning |
|---|---|
| 0 | The command did what it was asked. |
| 1 | The command failed; with --json, standard error's last line is the error object. |
| 64 | The command line is wrong, as ArgumentParser found before the command ran. |
| 65 | What was given is wrong, found while the command ran; the same command fails until it changes. |
| 75 | The same command can work later with nothing changed, as while an update finishes. |
| 130 | Control-C cancelled what the command started. |