1., 设置全局属性
git config --global user.email “邮箱账号”
git config --global user.name “账号名字”
2,生成密钥
ssh-keygen -t rsa -C “邮箱账号”
3,将密钥添加到对应的git项目当中
4,测试链接
ssh -T git@github.com 或 ssh git@github.com -i <指定密钥所在的位置>
5,指定密钥登陆
ssh-agent bash --login -i
ssh-add <要添加的密钥,即等下链接要使用的密钥>
6,下载项目
git clone 项目下载路径 本地磁盘保存路径
7,在项目里面所在git的文件夹 右击 Git Bash Here
8,切换密钥
ssh-agent bash --login -i
ssh-add <要添加的密钥,即等下链接要使用的密钥>
9,上传
git add .
git commit -m ‘注释’
git push origin ‘分支的名字,主分支是master’
10,抓取
git pull origin master