第一个错误
在linux下运行 git pull origin master 会报错
error: The requested URL returned error: 403 Forbidden while accessing https: //github.com/XXX/WeiboTopic.git
解决方案:编辑在仓库下的.git文件下的config文件
在命令行执行: vim .git/config
[remote "origin"]
url = https://github.com/XXX/WeiboTopic.git
修改为:yourname就是你github的名字
[remote "origin"]
url = https://yourname@github.com/XXX/WeiboTopic.git
第二个错误
在命令行下执行:unset SSH_ASKPASS
1. git init 初始化一个库
2. git config --global user.name "Your Name"
3. git config --global user.email "email@example.com"
4. git remote add origin https://github.com/XXX/WeiboTopic.git 添加远程库
5. git pull origin master
6. 在push上传前
7. git status 看一下状态那些文件要add
8. git add +需要同步的文件
9. git checkout +不要同步更改的文件(status下面)
10. git commit -m “”
11. 解决冲突
具体的教程可以百度廖雪峰