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://$USER@172.11.11.11:port/urlXX XX_manifest.xml && repo sync
相关推荐
Bruce_Liuxiaowei13 小时前
解锁 SSH 的完整潜力:从登录到隧道,再到自动化
运维·自动化·ssh
liuyunshengsir3 天前
-bash: ssh-copy-id: command not found的两种解决方法
开发语言·ssh·bash
范桂飓4 天前
win11 安装 WSL2 Ubuntu 并支持远程 SSH 登录
linux·ubuntu·ssh
拉拉拉拉拉拉拉马4 天前
在ssh远程连接的autodl服务器(中国无root权限服务器)上使用copilt的Claude模型
运维·服务器·ssh
用户47949283569154 天前
SSH 完全指南:从芬兰学生的意外发明到撑起半个互联网的安全基石
ssh
乌111114 天前
pycharm连接GitHub,怎么配置 SSH 密钥并改用 SSH 连接
pycharm·ssh·github
运维开发王义杰4 天前
SSH Keys on macOS: Secure and Convenient with Keychain Access
macos·ssh
Cd ...4 天前
vscode ssh连接远程服务器一直显示正在打开远程Initializing VS Code Server(已解决)
服务器·vscode·ssh
Stardep14 天前
ssh远程连接服务器到vscode上“连接失败”
服务器·vscode·ssh
a.30214 天前
OpenCV(cv2)学习笔记:从模板匹配入门到常用函数
数据库·ubuntu·ssh