Ubuntu20.0.4创建ssh key以及repo命令的使用

  • 创建ssh key
    • ssh-keygen //一路回车 ,不用输入任何东西
    • cat ~/.ssh/id_rsa.pub
  • 配置git config
    • git config --global user.name xxx // 设置git用户名
    • git config --global user.email xxx.com.cn //设置git 邮箱
    • git config --list
    • // remove the git config
    • // rm -fr .gitconfig
  • 互信
    • cat ~/.ssh/id_rsa.pub
    • 登录gerrit后点击后上角账户名,选择settings,找到SSH keys,添加 id_rsa.pub的内容进去,不要忘记点"ADD NEW SSH KEYS"按钮。
    • ssh -p XXX Username****@172.11.11.11****
      • Username是ssh服务器给分配的 Username**。-p 表示指定端口(port),@后面是gerrit服务器地址**
      • ****ssh -p执行成功,会打印**** Welcome to Gerrit Code Review ****
    • repo下载git仓库:
      • ​​​​​​​​​​​​​​repo init -u ssh://[email protected]:port/urlXX XX_manifest.xml && repo sync
相关推荐
相醉为友19 小时前
VSCode通过SSH连接VMware虚拟机
ide·vscode·ssh
非自律懒癌患者21 小时前
相同IP和端口的服务器ssh连接时出现异常
服务器·tcp/ip·ssh
ID_云泽4 天前
SSH秘钥管理指南
运维·ssh
Kusunoki_D7 天前
Git Bash 启动时 ssh-agent 多次尝试启动但失败
git·ssh·bash
Tunny_yyy7 天前
VScode与远端服务器SSH链接
服务器·vscode·ssh
jianghx10248 天前
Centos 7 ssh连接速度慢(耗时20秒+)
linux·centos·ssh
木心8 天前
Github两种鉴权模式PAT与SSH
ssh·github
极小狐9 天前
如何创建并使用极狐GitLab 部署令牌?
运维·git·ssh·gitlab·github
PLUS_WAVE9 天前
【SSH 端口转发】通过SSH端口转发实现访问远程服务器的 tensorboard
linux·服务器·ssh·软件工程·端口转发·tensorboard
极小狐9 天前
极狐GitLab 的压缩和合并是什么?
运维·git·ssh·gitlab·github