美文网首页
git push 遇到“403 Forbidden”

git push 遇到“403 Forbidden”

作者: Jiafu | 来源:发表于2019-11-12 15:02 被阅读0次

git push
error: The requested URL returned error: 403 Forbidden while accessing https://github.com/jiafujiang/zookeeper.git/info/refs
fatal: HTTP request failed

解决方法:
编辑.git/config文件,修改

[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
[remote "origin"]
        fetch = +refs/heads/*:refs/remotes/origin/*
        # url = https://github.com/jiafujiang/zookeeper.git 将这行改成下面的样式,再试一下就可以了
        url = https://jiafujiang@github.com/jiafujiang/zookeeper.git
[branch "master"]
        remote = origin
        merge = refs/heads/master
[branch "sugon"]
        remote = origin
        merge = refs/heads/sugon

相关文章

网友评论

      本文标题:git push 遇到“403 Forbidden”

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