美文网首页
github提交代码失败常见问题汇总

github提交代码失败常见问题汇总

作者: 微笑吧_5464 | 来源:发表于2018-10-23 02:03 被阅读0次

1- 使用git push -u 远程库名 master 命令将本地提交的内容传到git远程库时出现错误,如图示:

image.png
  • 解决:使用 git push -f 命令重新传一遍即可;
    结果:


    image.png

2- git remote add origin git@github.com:WadeLeng/hello-world.git 报错

  • 错误提示:fatal: remote origin already exists.
  • 解决办法:git remote rm origin
  • 然后再执行:$ git remote add origin git@github.com:WadeLeng/hello-world.git 就不会报错误了

3-git push 提交后报403错误

  • 网上都说是要修改项目目录下的隐藏文件 .git里面的config文件,但本人试过,行不通;
  • 403主要原因是权限不足,不能访问;
    解决方法:在github官网的个人账号要验证邮箱,如果不验证的话,就会提交push时报403的错误。

相关文章

网友评论

      本文标题:github提交代码失败常见问题汇总

      本文链接:https://www.haomeiwen.com/subject/pmxozftx.html