Gerrit 简明教程
Gerrit - Add SSH Key to use with Git
你可以使用以下命令向 Git 添加 SSH 密钥 −
You can add SSH key to Git using the following commands −
-
Step 1 − Open Git Bash and get the ssh-agent using the following command.
$ eval 'ssh-agent'
-
Step 2 − Next, add the SSH key to the ssh-agent using the following command
$ ssh-add ~/.ssh/id_rsa
-
Step 3 − Now, run the ssh using the following command, which matches the SSH fingerprint used when logging for the first time.
$ ssh -p 29418 <user_name>@gerrit.wikimedia.org

在上面的屏幕截图中,你可以看到 xyz123 是实例 shell 帐户名称,它在创建 Gerrit 帐户时使用,而 Abc123 是你的 Gerrit 帐户的用户名。
In the above screenshot, you can see that xyz123 is a instance shell account name, which is used while creating Gerrit account and Abc123 is a user name of your Gerrit account.