SSH公钥

  • 生成公钥

    • ssh-keygen -t rsa -C "xxx@xxx.com"
    • 然后按三次回车
  • 添加公钥
    • cat ~/.ssh/id_rsa.pub查看公钥
    • 将生成的公钥添加到仓库或个人设置中的SSH公钥
  • 配置多个SSH-Key

克隆仓库到本地

  • git clone 仓库地址

推送到远程仓库

  • 与仓库建立连接

    • git remote add origin 仓库地址
  • Push
    • git push origin master

从远程仓库拉取更新到本地仓库

  • git pull origin master
05-27 05:47