配置github
进入到.ssh目录下cd ~/.ssh
在命令行输入: ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
, 其中your_email@example.com是注册github的邮箱地址。回车。 当看到Enter file in which to save the key (/c/Users/Administrator/.ssh/id_rsa):
时, 输入要生成文件的名字: id_rsa_github
, 回车, 生成两个文件id_rsa_github
, id_rsa_github.pub
进入一个想存放github上文件的目录, cd F:\github
在该目录下配置github信息:
$ git config --global user.name "yourname"
$ git config --global user.email "youremail"
将id_rsa_github.pub
中的信息添加到github【settings】中的【SSH keys】中
配置gitee
进入到.ssh目录下cd ~/.ssh
在命令行输入: ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
, 其中your_email@example.com是注册gitee的邮箱地址。回车。 当看到Enter file in which to save the key (/c/Users/Administrator/.ssh/id_rsa):
时, 输入要生成文件的名字: id_rsa_gitee
, 回车, 生成两个文件id_rsa_gitee
, id_rsa_gitee.pub
进入一个想存放gitee上文件的目录, cd F:\gitee
在该目录下配置gitee信息:
$ git config --global user.name "yourname"
$ git config --global user.email "youremail"
将id_rsa_gitee.pub
中的信息添加到gitee【settings】中的【SSH keys】中
查看电脑中自己的配置信息