pubkeys

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package pubkeys regenerates public keys from the key they belong to: the private key file for a key on disk (ssh-keygen -y), or the vault item for a key kept in 1Password. It repairs a missing or wrong .pub; it never creates or changes a private key - that is reconcile's and rotate's job.

Index

Constants

View Source
const (
	Unchanged = "unchanged" // already matched its key
	Created   = "created"   // was missing
	Rewritten = "rewritten" // did not match its key
	Skipped   = "skipped"   // nothing to derive it from, or needs a passphrase
	Failed    = "failed"
)

What happened to one key's .pub.

Variables

This section is empty.

Functions

func Format

func Format(results []Result, dryRun bool) string

Format renders results, one line per key, then a tally.

Types

type Result

type Result struct {
	Ref    manifest.KeyRef
	Action string
	Detail string
}

Result is the outcome for one key.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service regenerates public keys under one ~/.ssh.

func New

New builds a Service.

func (*Service) Regenerate

func (s *Service) Regenerate(rows []keysvc.Row, dryRun bool) []Result

Regenerate rebuilds the .pub of each row. With dryRun nothing is written and the inventory is left alone; the actions are what a real run would do.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL