当前位置:Gxlcms > mysql > linuxgit错误403Forbiddenwhileaccessing和Gtk

linuxgit错误403Forbiddenwhileaccessing和Gtk

时间:2021-07-01 10:21:17 帮助过:16人阅读

第一个错误 在linux下运行gitpulloriginmaster会报错 error:TherequestedURLreturnederror:403Forbiddenwhileaccessinghttps: //github.com/XXX/WeiboTopic.git 解决方案:编辑在仓库下的.git文件下的config文件 在命令行执行: vim.git/config [remoteorigi

第一个错误

在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



接下来就是输入你的密码。


简单地总结一些github的使用


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. 解决冲突

具体的教程可以百度廖雪峰




人气教程排行