SSH Public Key -> Add Key本地环境配置(1) 查看配置git config --global --li_gerrit配置ssh">
当前位置:   article > 正文

Gerrit SSH 配置使用_gerrit配置ssh

gerrit配置ssh

Gerrit配置使用

  1. 获取账号密码
  2. 生成ssh密钥对
    (1) 确认是否已经有密钥对
 ls ~/ssh  
  • 1

(2) 密钥对重新生成步骤
在linux系统终端执行:

 ssh-keygen -t rsa -C "xxx@xxx.com"
  • 1
  1. Gerrit网页配置
    获取公钥 cat ~/.ssh/id_rsa.pub
    登录Gerrit, Settings -> SSH Public Key -> Add Key
  2. 本地环境配置
    (1) 查看配置
git config --global --list  
  • 1

(2) 添加配置

git config --global url.ssh://xxx@xxx.com:xxx/.insteadof ssh://xxx.com  
  • 1

(3) 删除配置

git config --global --remove-section url.ssh  
  • 1

(4) 重新配置

git config --global --unset url.ssh
  • 1
  1. 测试连接
 ssh -p 
  • 1

SSH 配置使用

 ssh-keygen -t rsa
  • 1

记住账号密码

 scp /home/xxx/.ssh/id_rsa.pub xx@8.8.8.8:/xxx/.ssh/authorized_keys
  • 1
声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop】
推荐阅读
相关标签
  

闽ICP备14008679号