gerrit 初次使用说明(ssh key配置)

内容分享1天前发布
0 0 0

一、 安装git

  • Windows 10下安装Git
    https://git-scm.com/download/win

  • Linux下安装Git:
    https://git-scm.com/download/linux

  • Mac 安装Git:
    https://git-scm.com/download/mac

二、ssh key、配置git

1、设置username和email

 git config --global user.name “此处填写你的邮箱前缀”
 git config --global user.email "此处填写工作邮箱"

2、通过终端命令创建ssh key

ssh-keygen -t rsa -C “此处填写工作邮箱”

3、config配置

  • .ssh/config 常用配置 https://www.cnblogs.com/hangj/p/11506686.html
  • (>和>>)的区别 https://jingyan.baidu.com/article/948f59240ef17dd80ff5f9ba.html

echo "Host gerrit_me" >> ~/.ssh/config
echo "HostName gerrit ip地址/域名" >> ~/.ssh/config
echo "Port 29418" >> ~/.ssh/config
echo "User gerrit登录的用户名" >> ~/.ssh/config
echo "IdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config

配置public key

gerrit 初次使用说明(ssh key配置)

  • cat本机电脑上~/.ssh下的id_rsa.pub粘贴到Settings 内的SSH Public Keys

    gerrit 初次使用说明(ssh key配置)

    gerrit 初次使用说明(ssh key配置)

© 版权声明

相关文章

暂无评论

您必须登录才能参与评论!
立即登录
none
暂无评论...