Git安裝及配置SSH-Key

下載Git

  1. 打開 //git-scm.com/downloads
  2. 選擇windows, 下載並安裝。
    image-20200627115030671

配置全局用戶名及郵箱

  1. 配置用戶名

    git config --global user.name "用戶名"
    

    配置完成後可輸入git config user.name 查看當前配置的用戶名
    image-20200627115439446

  2. 配置用戶郵箱

    git config --global user.email "用戶郵箱"
    

配置ssh-key

  1. 輸入生產sshkey命令,把郵箱設置為git賬戶的郵箱

    ssh-keygen -o -t rsa -b 4096 -C "[email protected]"
    

    直接回車,然後會生產一個sshkey文件,
    image-20200627115924174

    打開id_rsa.pub文件,將文件內容複製到ssh添加的輸入框中即可
    image-20200627120053977