当前位置:   article > 正文

解决git上传错误_git fetch fail is owned by

git fetch fail is owned by

在用git上传时,发送如下错误

[root@rhel6 git]# git push -u origin master
error: The requested URL returned error: 403 while accessing https://github.com/HangzhouSeason/test-onlyfortest.git/info/refs


fatal: HTTP request failed


解决办法:

修改配置文件

输入:vi .git/config来修改配置文件:

修改前:

[remote "origin"]
     url = https://github.com/*********/test-onlyfortest.git
     fetch = +refs/heads/*:refs/remotes/origin/*

修改后:

[remote "origin"]
     url = https://你的用户名@github.com/********/test-onlyfortest.git
     fetch = +refs/heads/*:refs/remotes/origin/*

然后输入:wq保存退出

再输入:git push -u origin master 就能正确上传啦。



声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小桥流水78/article/detail/738789
推荐阅读
相关标签
  

闽ICP备14008679号