git push 到两个远程的创库,github、bitbucket
某草草
某草草 2017-05-02 09:22:30
[Git讨论组]

我现在有一个本地创库,可以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配置的啊。

请帮帮我,非常感谢!

某草草
某草草

全部回复(1)
给我你的怀抱
git remote set-url origin https://leopardpan@github.com/leopardpan/blog.git
git push origin master
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号