← 返回命令列表

Linux command

gh-ssh-key 命令

网络

需要网络或远程资源。

常用示例

List SSH keys

gh ssh-key list

Add an SSH key

gh ssh-key add [key.pub]

Add with title

gh ssh-key add [key.pub] -t "[title]"

Delete an SSH key

gh ssh-key delete [key_id]

说明

gh ssh-key manages SSH public keys associated with your GitHub account for secure Git authentication. SSH keys provide an alternative to HTTPS authentication, enabling passwordless git operations. The command supports adding new SSH keys from public key files, typically generated with ssh-keygen. Keys can be labeled with titles for identification when managing multiple keys across different machines. Deletion removes keys from your GitHub account, immediately revoking access.

参数

-t, --title _title_
Key title.

FAQ

What is the gh-ssh-key command used for?

gh ssh-key manages SSH public keys associated with your GitHub account for secure Git authentication. SSH keys provide an alternative to HTTPS authentication, enabling passwordless git operations. The command supports adding new SSH keys from public key files, typically generated with ssh-keygen. Keys can be labeled with titles for identification when managing multiple keys across different machines. Deletion removes keys from your GitHub account, immediately revoking access.

How do I run a basic gh-ssh-key example?

Run `gh ssh-key list` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -t, --title _title_ do in gh-ssh-key?

Key title.