Git安装及配置SSH-Key

下载Git

  1. 打开 https://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

猜你喜欢

转载自www.cnblogs.com/xsong/p/13197907.html