Skip to main content
On this page

Kater CLI Share and administer admin write-back

kater admin write-back connect

Connects the GitHub repository that Kater writes its shared layer to.

It opens GitHub so that you authorize Kater’s GitHub App. Then it asks for the account, the repository, the folder and the schedule. Connecting again replaces the repository.

Examples

Terminal window
# Connect a repository, step by step
kater admin write-back connect
# Connect, and write back to kater/ after each publish
kater admin write-back connect --path-prefix kater/ --schedule on_publish
# Connect, and write back at 06:00 UTC each day
kater admin write-back connect --schedule cron --cron "0 6 * * *"

Options

OptionDescription
--installation-id <id>The GitHub App installation to use. Leave it out to select the account when the command asks.
--repository-id <id>The repository to write back to. Leave it out to select it when the command asks.
--path-prefix <folder>The folder in the repository for the shared layer, such as kater/. Leave it out to type it when the command asks, where kater/ is the default.
--schedule <schedule>When Kater writes back: on_publish after each publish, or cron on a cron schedule.
--cron <expression>A cron expression of five fields, in UTC, such as 0 6 * * *. Give it with --schedule cron.

It also takes --help.

The questions

  1. GitHub opens in your browser. Authorize Kater’s GitHub App as yourself.
  2. Select the account. To use a new account, select Install Kater’s GitHub App on another account and install the App. Then answer yes at “Installed?”.
  3. Select the repository. The list shows only the repositories where you are an admin.
  4. Type the folder, or press Enter for kater/.
  5. Select After each publish, or On a cron schedule (UTC). A cron schedule asks for the expression, which is 0 6 * * * unless you type another.

The command needs a terminal, because it opens your browser and asks questions. It replaces kater git reconnect.

When Kater writes back

  • With on_publish, Kater writes back about one minute after the last change to the shared layer. Many changes close together make one run.
  • Connecting does not write back at once. Run kater admin write-back run to write back now.

It needs the settings:manage permission.

See also