git 本地无法push 项目冲突
github情况:有两个仓库,一个叫Mathematical-thinking,另一个叫Hone-skill。
机器:virtual box 安装的centos 6.6
环境:终端界面,用xshell登陆centos6.6
目录:/home/git/Hone-skill 以及 /home/git/Mathematical-thinking
git 目录只是用来放这些仓库的
问题:
情况一:如果我在github的仓库Mathematical-thinking中添加了.ssh/id_rsa.pub的ssh的话,那么我在Mathematical-thinking目录下可以git push,但是在Hone-skill下git push 会出现
ERROR: Permission to fangmenghao/Hone-skill.git denied to fangmenghao/Mathematical-thinking.git
fatal: The remote end hung up unexpectedly
情况二:如果我在github的仓库Hone-skill中添加了.ssh/id_rsa.pub的ssh的话,那么我在目录Hone-skill下可以git push,但是在Mathematical-thinking下git push 会出现
ERROR: Permission to fangmenghao/Mathematical-thinking.git denied to fangmenghao/Hone-skill.git
fatal: The remote end hung up unexpectedly
github上我不能同时给两个仓库都添加ssh,会出现key is already的提示
就是我给哪个仓库添加了ssh key,哪个仓库就可以push,没添加的不能push
我希望能够两个目录都能git push,不要每次想git push 就删除这个仓库的key添加到另一个仓库
如果你对这篇文章有疑问,欢迎到本站 社区 发帖提问或使用手Q扫描下方二维码加群参与讨论,获取更多帮助。

发布评论
需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。