sshkeys

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CmdSSHKeyAdd = cli.Command{
	Name:        "add",
	Usage:       "Add an SSH public key",
	Description: "Add an SSH public key to the current user's profile",
	ArgsUsage:   "<key-file>",
	Action:      RunSSHKeyAdd,
	Flags: append([]cli.Flag{
		&cli.StringFlag{
			Name:    "title",
			Aliases: []string{"t"},
			Usage:   "Title for the key (defaults to the filename without extension)",
		},
	}, flags.LoginOutputFlags...),
}

CmdSSHKeyAdd represents a sub command of ssh-keys to add an SSH public key

View Source
var CmdSSHKeyDelete = cli.Command{
	Name:        "delete",
	Aliases:     []string{"rm"},
	Usage:       "Delete an SSH key",
	Description: "Delete an SSH key from the current user's profile by its numeric ID",
	ArgsUsage:   "<key-id>",
	Action:      RunSSHKeyDelete,
	Flags: append([]cli.Flag{
		&cli.BoolFlag{
			Name:    "confirm",
			Aliases: []string{"y"},
			Usage:   "Confirm deletion (required)",
		},
	}, flags.LoginOutputFlags...),
}

CmdSSHKeyDelete represents a sub command of ssh-keys to delete an SSH key by ID

View Source
var CmdSSHKeyList = cli.Command{
	Name:        "list",
	Aliases:     []string{"ls"},
	Usage:       "List SSH keys",
	Description: "List the SSH keys registered for the current user",
	ArgsUsage:   " ",
	Action:      RunSSHKeyList,
	Flags: append([]cli.Flag{
		&flags.PaginationPageFlag,
		&flags.PaginationLimitFlag,
	}, flags.LoginOutputFlags...),
}

CmdSSHKeyList represents a sub command of ssh-keys to list the current user's SSH keys

Functions

func RunSSHKeyAdd

func RunSSHKeyAdd(_ stdctx.Context, cmd *cli.Command) error

RunSSHKeyAdd reads a public key file and registers it with the Gitea instance

func RunSSHKeyDelete

func RunSSHKeyDelete(_ stdctx.Context, cmd *cli.Command) error

RunSSHKeyDelete removes an SSH key by its numeric ID

func RunSSHKeyList

func RunSSHKeyList(_ stdctx.Context, cmd *cli.Command) error

RunSSHKeyList lists SSH keys for the current user

Types

This section is empty.

Jump to

Keyboard shortcuts

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