本地git库gitlab库链接服务器库 idea git 配置 gitlab 配置 git生成ssh公钥

下载git  https://git-scm.com/

安装以后会右键菜单出现Git Base Here

点击Git Base Here   输入

cd ~

 

进入你的用户根目录

创建文件夹

mkdir ~/.ssh

进入文件夹

cd .ssh

配置全局的name和email

  1.  
    git config --global user.name "你的名字"
  2.  
     
  3.  
    git config --global user.email "你的邮箱"

生成key

ssh-keygen -t rsa -C "你的email"

一直按回车就会生成两个文件

id_rsa和id_rsa.pub

把id_rsa.pub复制到git服务器里或者gitee/github     配置到服务器服务的  SSH Keys 里.(重要)

参考: https://blog.csdn.net/zyydecsdn/article/details/79567305

原文地址:https://www.cnblogs.com/suizhikuo/p/9396612.html