本地的git仓库和远程的github仓库的通信方式主要是两种:http和ssh。github的推荐是使用http。http唯一不太好的地方是push等需要输入用户名密码。两种方式的对比看网址:https://help.github.com/articles/set-up-git/
关于http的使用看:https://help.github.com/articles/which-remote-url-should-i-use/#cloning-with-https-urls-recommended
关于SSH方式如何修复permission denied: https://help.github.com/articles/error-permission-denied-publickey/
常用的
git remote add origin https://github.com/xiaojieLee/xxxxx.git git push -u origin master
其实使用的是SSH方式。