ubuntu下通过git操作github

默认分类 · 2016-01-08

一、具体过程:

http://blog.csdn.net/small_rice_/article/details/45095323

二、遇到问题及理解错误的地方

1.ssh

已经使用过ssh连接其他的网站,如果按前述教程重新生成了id_rsa和id_rsa.pub,则有可能会报错: Agent admitted failure to sign using the key.

解决办法 ssh-add即可

2.创建repository

这个只能通过firefox或者chrome在github上创建,不能通过git创建

3.执行git push -u origin master报错:

To git@github.com:dengshiyong/nginx-module-developed-by-cpp ! [rejected] master -> master (fetch first) error: failed to push some refs to 'git@github.com:dengshiyong/nginx-module-developed-by-cpp' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.

解决办法: git pull git@github.com:dengshiyong/nginx-module-developed-by-cpp 再 git push -u origin master

ubuntu linux git
Theme Jasmine by Kent Liao