Skip to content

Restore Secret Buckets From bootstrap Before the GitHub Step #4242

Closed

Description

@ptr727

Problem

A rebuilt host has no way to restore its secret files before it is stood up. scripts/secrets_sync.py can pull a bucket, but a new host has no op and no hub checkout until bootstrap.sh --host has run. That run's GitHub step generates a new SSH key and stops for a paste, when the host's own key is already escrowed in a bucket. Restoring afterwards overwrites the key that was just registered.

Decided Shape

Settled with the maintainer on 2026-11-16:

  • bootstrap.sh --secrets LIST and bootstrap.ps1 -Secrets LIST, LIST being bucket names separated by commas, the same form as --agents.
  • On its own it installs op through the tools installer and pulls exactly the named buckets into the home directory.
  • Given with --host or --dev it runs inside the stand-up, after the tools step and before the GitHub step. A restored ~/.ssh/id_ed25519 is then the key setup-github.sh keeps, so a key already registered needs no paste.
  • Only the named buckets are pulled. Nothing is derived from the hostname or a file prefix.
  • The work runs from host-setup/linux/restore-secrets.sh and host-setup/windows/restore-secrets.ps1, which bootstrap reaches through its tree like every other step.
  • Windows is built and unit-tested here. Native verification stays with Verify the op Host Tool and secrets_sync.py Natively on Windows #4188.

Done

Merged into develop with tests, for Linux and Windows, and documented where the bootstrap actions and secrets_sync.py are documented.

Activity

  1. added a commit that references this issue on Nov 17, 2026
    d324114
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions