1

Good day,

I have this extremely weird problem, Someone added me as a member of his organization in github, and asked me for a rsa key, I am a member of that organization now, but now all my other projects point to that Organization's Repo when doing a Push, ie:

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.

When I print my remote origin config it displays what appears to be the correct information:

for_linode $ git remote show origin
* remote origin
  Fetch URL: git@github.com:jlstr/for_linode.git
  Push  URL: git@github.com: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)

Why is it trying to push to the other_org/core Repo? I've never seen something as weird as this, I really wish someone can help me out with this strange Issue.. :(

Thanks in advance,

Jose.

EDIT:

for_linode $ git remote -v
origin  git@github.com:jlstr/for_linode.git (fetch)
origin  git@github.com:jlstr/for_linode.git (push)

EDIT:

for_linode $ ssh -T git@github.com
Hi new_org/core! You've successfully authenticated, but GitHub does not provide shell access.
jlstr
  • 2,986
  • 6
  • 43
  • 60
  • what does `git remote -v` returns? – iberbeu Mar 18 '13 at 15:41
  • @iberbeu Hello, thanks for the reply, I've added the result of that command to the original question as edit. – jlstr Mar 18 '13 at 15:45
  • Why did they ask for a rsa key? All you need is to add your github user to the organization. – manojlds Mar 18 '13 at 15:46
  • Well, the key is used to access a VPS server too. While that's true, I'm assuming he added my generated public key to the github Repo to grant me push/pull privileges too. Not sure if it's needed though. – jlstr Mar 18 '13 at 15:49

1 Answers1

1

Try doing

ssh -T git@github.com

It should print back your username.

You are not supposed to give rsa keys ( public ) to others to add you to an organization. All they have to do is add your github user to the organization, and that user will, of course, be associated with your key. Ask your key to be removed from wherever it has been added, or generate a new pair.

manojlds
  • 290,304
  • 63
  • 469
  • 417
  • Hi there! the result of that command is now pasted at the bottom of the question. that command is replying from the Repo I DO NOT want to Push To (The one for which the rsa key was given). I'm clueless, what does this mean? How can I fix my current problem? - Thanks for your answer. – jlstr Mar 18 '13 at 15:53
  • @JoseE - the fix is in my answer. – manojlds Mar 18 '13 at 15:54
  • Ok, I'll pass this information to the Organization owner, and tell you the results afterwards. Thanks again! – jlstr Mar 18 '13 at 16:01
  • Yes, this does indeed solve the problem, after the repo owner removed the key from the repo, and I re-sent the push to a different Repo; it started to work. However, I would like to know if there's something I must do in order to push to the troublesome Repo(other_org/core)? GitHub states: "To remedy this, remove the deploy key from the repo and attach the key to your user account instead", the 1st part is done, Do I have to attach the key to MY user account now? – jlstr Mar 18 '13 at 18:06