`
dengzhangtao
  • 浏览: 667568 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

git push 问题

git 
阅读更多
前言:
加入rom开发组后,一直在看cm9系统的源码,现在要把修改的使用git版本控制工具上传至服务器,  所有开始熟悉git的基础使用。


基础的git命令倒是不难, 需要理解git,即和svn的区别,理解branch。

正题:
branch正确的情况下,
不知为什么,在push的时候总是出现:

fatal: remote error:
  You can't push to git://github.com/user_name/user_repo.git
  Use git@github.com:user_name/user_repo.git

的提示,
解决办法:

$ git remote rm origin
$ git remote add origin git@github.com:user_name/user_repo.git

$ git push origin

ok!
经过高人的点播,找到了原因:
如果在git clone的时候用的是git://github.com:xx/xxx.git 的形式, 那么就会出现这个问题,因为这个protocol是不支持push的

总结 git clone 和  git init 的不同
前者是协议git://
后者是http://






0
2
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics