Gerrit 简明教程

Gerrit - Add Your SSH Key

您可以在不同的平台上向 ssh-agent 添加 SSH 密钥,进一步讨论。

You can add SSH key to the ssh-agent on different platforms discussed further.

Linux

在 Linux 系统上使用以下命令添加 SSH 密钥

Use the following command on Linux system to add SSH key

cat /home/<local-user>/.ssh/id_rsa.pub

Windows

打开 GIT GUI,并转到 Help → Show SSH Key ,如下图所示。

Open the GIT GUI and go to Help → Show SSH Key as shown in the following image.

adding ssh key

然后,单击 Copy To Clipboard 按钮,将密钥复制到剪贴板。

Then, click the Copy To Clipboard button, to copy the key to the clipboard.

adding ssh key1

Mac

在 Mac OS X 中,您可以使用以下命令将 id_rsa.pub 内容复制到剪贴板。

In Mac OS X, you can copy id_rsa.pub contents to the clipboard using the following command.

$ pbcopy < ~/.ssh/id_rsa.pub