我現在有一個本地創庫,可以push到bitbucket上去,但是push到github上就會報錯,如下:
remote: Permission to leopardpan/blog.git denied to leopardpanbaixin.
fatal: unable to access 'https://github.com/leopardpan/blog.git/': The requested URL returned error: 403 。
我的config如下:
[remote "origin"]
url = https://github.com/leopardpan/blog.git
fetch = +refs/heads/:refs/remotes/origin/
[remote "bit"]
url = https://leopardpan@bitbucket.org/flutterSnow/demo-one.git
fetch = +refs/heads/:refs/remotes/bit/
[branch "master"]
remote = origin
remote = bit
merge = refs/heads/master
我的兩個遠端創庫都存在,url也加入進來了,但是push到github上就會失敗,push到bitbucket能成功。我猜是不是,之前我設定
git config --global user.name leopardpan
git config --global user.email panbaixin123@163.com
導致兩個遠端創庫配置問題,但是我安裝都是根據github的name和email配置的啊。
請幫幫我,非常感謝!