当前位置:   article > 正文

ubuntu用git/repo拉取gerrit代码前的本地基础配置_ubuntu add ssh key to gerrit

ubuntu add ssh key to gerrit

1. Create you SSH-key.

If you've already generated it, you don't need to regenerate it !
else:
$ssh-keygen  -t  rsa  -C  your-email
Now the public key will be located in ~/.ssh/id_rsa.pub


2. Add your key to Gerrit server.

$cat  ~/.ssh/id_rsa.pub
• Open web of gerrit , sign in
• Click “Settings” and then “SSH Public keys”. Paste the entire contents of your ~/.ssh/id_rsa.pub into the textbox and click the “add” button.


3. Create or edit the file ~/.ssh/config and add configuration.

$sudo apt-get install vim    (you need know a little VIM, if not, please use gedit)
$vi  ~/.ssh/config   or   gedit ~/.ssh/config
Paste and edit the following content:

  1. Host gerrit1
  2. HostName XXXXX
  3. Port 29418
  4. User your-gerrit-login-username
  5. IdentityFile ~/.ssh/id_rsa

$chmod og-rwx  ~/

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小丑西瓜9/article/detail/631168
推荐阅读
相关标签
  

闽ICP备14008679号