git push试图推送到一个错误的远程起源?

问题描述:

好日子,git push试图推送到一个错误的远程起源?

我有这个非常奇怪的问题,有人加我为他在github上组织的成员,并问我要RSA密钥,我是该组织的成员了,但现在所有的我的其他项目指向该组织的回购时做推,即:

for_linode $ git push origin master 
ERROR: Permission to jlstr/for_linode.git denied to other_org/core. 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 
and the repository exists. 

当我打印我的远程起源的配置也显示这似乎是正确的信息:

for_linode $ git remote show origin 
* remote origin 
    Fetch URL: [email protected]:jlstr/for_linode.git 
    Push URL: [email protected]:jlstr/for_linode.git 
    HEAD branch: master 
    Remote branch: 
    master tracked 
    Local branch configured for 'git pull': 
    master merges with remote master 
    Local ref configured for 'git push': 
    master pushes to master (fast-forwardable) 

为什么它试图推送到other_org /核心回购?我从来没有见过怪异,因为这东西,我真希望有人可以帮我这个奇怪的问题.. :(提前

感谢,

何塞

编辑:

for_linode $ git remote -v 
origin [email protected]:jlstr/for_linode.git (fetch) 
origin [email protected]:jlstr/for_linode.git (push) 

编辑:

for_linode $ ssh -T [email protected] 
Hi new_org/core! You've successfully authenticated, but GitHub does not provide shell access. 
+0

'git remote -v'返回什么? – iberbeu 2013-03-18 15:41:18

+0

@iberbeu您好,感谢您的回复,我已将该命令的结果作为编辑添加到原始问题中。 – jlstr 2013-03-18 15:45:10

+0

他们为什么要求一个rsa密钥?您所需要的只是将您的github用户添加到组织中。 – manojlds 2013-03-18 15:46:38

尝试做

ssh -T [email protected] 

它应该打印回您的用户名。

你不应该给他人发布rsa密钥,以便将你添加到组织中。他们所要做的就是将您的github用户添加到组织中,并且该用户当然会与您的密钥相关联。要求您的密钥从已添加的位置移除,或者生成一对新密钥。

+0

你好!该命令的结果现在被粘贴在问题的底部。该命令从回购I回复不想推送到(给予rsa密钥的那个)。我很无知,这是什么意思?我该如何解决目前的问题? - 感谢您的回答。 – jlstr 2013-03-18 15:53:36

+0

@JoseE - 修复是在我的答案。 – manojlds 2013-03-18 15:54:35

+0

@JoseE - 介绍您的场景http://*.com/a/7514309/526535 – manojlds 2013-03-18 16:01:05