git简单的操作

安装git,然后是shell

 

git config –global user.name “alan.luo”//设置开发者的名字
git config –global user.email “lanxine@qq.com”//设置开发者的邮箱

ssh-keygen -t rsa -C “lanxine@qq.com”//生成公钥

cat ~/.ssh/id_rsa.pub//查看公钥,然后会显示如下字符串:

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCoibHh9t2Vzdfgtjn+GKK4pjpCsuU/qT+G7L2utYvkyHpXwX17WSnmY5GEHiRCM64mGaEklE44K0SQhyVckvhrPA2/bdhgT7RKSkP1aL+rK3nAM2X73argQVR+KKLWtbbk/x7pjDhRq+jr0LIXlzsF38Nt4E1XikgL+/ubU8fGuiJEJacM9Rw9EXjhUw2lchSQ9MmqJRdhXD+e9iKoNmIJyUg1kSt60KTFd5G60kAOjHrQ6zidNmkIhmvamy9eBL4JvBszmjhdDTE3pRgAkgUn5+I41KwDG0AX2DCmAjJMplDJqmmGmleGI6Xd6qI+b6AnPAKwqOTOg29xm2T0XpZp “你的邮箱
接着把公钥添加到git.oschina.net
ssh -T git@git.oschina.net

git clone git@git.oschina.net:ShangDaoWenLu/shangdaoProject.git

Leave a Comment

 
Copyright © 2008-2021 lanxinbase.com Rights Reserved. | 粤ICP备14086738号-3 |