git push 遇到“403 Forbidden”

2019-11-12  本文已影响0人  Jiafu

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
上一篇下一篇

猜你喜欢

热点阅读