2. GitHub远程仓库

1. GitHub
ssh-keygen -t rsa -C "[email protected]"

       之后再用户主目录里会有隐藏的.ssh目录,里面有id_rsa和id_rsa.pub两个文件,这两个就是SSH Key的秘钥对,id_rsa是私钥,不能泄露出去,id_rsa.pub是公钥,可以放心地告诉任何人

       然后在GitHub的账户信息中。SSH添加id_rsa.pub的文本信息即可

2. 本地仓库与GitHub关联
##完成第一步添加了本地电脑的SSH
git remote add origin https://github.com/MachineJeff/gitlearn.git
git push -u origin master                   ##第一次将本地仓库推送

git push origin master                      ##此后,每次本地提交后,就可以使用此命令推送
3. 从GitHub克隆
git clone https://github.com/MachineJeff/gitskills.git

       

猜你喜欢

转载自www.cnblogs.com/machine-lyc/p/10642295.html