一、安装git,在Windows下右键,菜单栏有Git GUI Here和Git Bash Here表示安装成功,下载地址:
https://git-scm.com/downloads
二、在github官网上注册一个账号,网址:
https://github.com
三、在Windows下打开Git,右键打开Git Bash Here,如图:
四、在本地电脑和Git网站上分别新建一个仓库,并将两个仓库远程关联
1创建SSH Key ,可跳过设置密码,一路Enter,会创建一个.ssh文件夹
$ ssh-keygen -t rsa -C "2637977081.@qq.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/Administrator/.ssh/id_rsa)://保存的路径
/c/Users/Administrator/.ssh/id_rsa already exists.
Overwrite (y/n)?
2用记事本打开.ssh下的id_rsa.pub,全部拷贝,里面为key值
ssh-rsa .............. #####@!!.com
3登陆GitHub,粘贴key值,构成连接
4测试是否连接成功:
ssh -T git@github.com