标签:
sudo apt-get install openssh-server sudo apt-get install openssh-client
sudo /etc/init.d/ssh restart
安装git
ssh-keygen -C ‘xxx@xxx.com‘ -t rsa //这是在网上看到的,我执行之后在我用户目录下没有生成.ssh 只做参考 ssh-keygen -C ‘xxx@xxx.com‘ -f ~/.ssh/gotgithub //执行这个命令之后,会提示为私钥输入密码 //生成gotgithub gotgithub.pub
ssh -T git@github.com //输出下面的信息 //Hi gotgithub! You are successfully authenticated, but github does not provide shell access
git init //初始化一个代码仓库 git clone git://github.com/xxx/xxx.git //在github上clone一个库 git add xxx /* * 在执行下面的命令时需要执行 * git config --global user.name "xxx" * git config --global user.email "xxx@xxx.com" */ git commit -m "xxx" git remote add origin https://github.com/xxx/xxx.git git push -u origin master //然后输入你的用户名和密码就OK了
http://blog.csdn.net/u010297071/article/details/21393063
标签:
原文地址:http://www.cnblogs.com/dd550023981/p/4771017.html