1

I have an open-source project called ui-animate which I wanted to update today and from the console I'm getting the message:

Permission denied (publickey).
fatal: Could not read from remote repository.

That's odd for all sorts of reasons:

  1. I have setup this computer's SSH key to authenticate me
  2. I can authenticate against other repos with the same permissions
  3. I can't even do a git pull (aka, a read operation)
  4. I've worked on this specific repo, in this particular directory, on this computer in the past w/out issues.
  5. I even went into the repo, created a group, added myself to it, and gave it permissions (even though I already supposedly have access personally).
  6. I checked my SSH keys in my ~/.ssh directory and they're there and haven't changed in years.

Anyone have a clue what I could be doing wrong?

my computer's ssh key in github config

repo giving permissions to me at group and individual level


I have also checked the SSH connection (although pretty clearly this isn't an issue since I can connect to other github repos just fine), anyway just for completeness:

OpenSSH_7.2p2, LibreSSL 2.4.1

Hi XXXXX! You've successfully authenticated, but GitHub does not provide shell access.

debug1: channel 0: free: client-session, nchannels 1

debug1: fd 2 clearing O_NONBLOCK

Transferred: sent 2672, received 1776 bytes, in 0.2 seconds

Bytes per second: sent 13639.3, received 9065.6

debug1: Exit status 1

Community
  • 1
  • 1
ken
  • 8,763
  • 11
  • 72
  • 133
  • Not ideal, but can you try switching to HTTPS? – Scott Weldon Sep 29 '16 at 15:32
  • 1
    @ScottWeldon yeah i may have to but it's just so weird that it only happens on this one repo (and it used to a month ago on this computer) – ken Sep 29 '16 at 15:39
  • not my area of *any* knowledge but how about http://stackoverflow.com/questions/2643502 , perhaps sort the answers with the 'oldest' link, go to bottom for most recent – Drew Sep 29 '16 at 15:42
  • @Drew i did look at this issue and have tried most things but didn't see the forwarding option; will give that a shot now but because it's isolated to a single repo I wouldn't have thought this would work any magic ... nope didn't work. Bummer. – ken Sep 29 '16 at 15:47
  • Also this can be useful [GitHub Error Message - Permission denied publickey](http://stackoverflow.com/questions/12940626/github-error-message-permission-denied-publickey) – Petter Friberg Sep 29 '16 at 15:54

1 Answers1

2

Ok, i've found an answer to my problem. It is related to a change that GitHub made a few months back when they introduced more features around Organizations and Groups. When that feature was introduced it made it easy for you to move existing repos into an an Organisation and in the case of the problematic repo I took advantage of that. Of course doing that also changes the origin URL so you I needed to back to my git repo that was checked out before the change and update it to point to the group I'd created.

To help illustrate this further, the before and after of my repo's origin URL:

Before

 ssh://ksnyde@github.com/lifegadget/ui-animate.git

After

 ssh://git@github.com:lifegadget/ui-animate.git

Where "lifegadget" is the name of my Organisation and my userId is "ksnyde". Hope this helps someone else with their future problem. Also big thanks to all above who commented and helped me keep on pushing through this. @petter your post wasn't directly the solution but there was some text about origin URL's that suddenly lead me to realize what had happened.

Drew
  • 24,851
  • 10
  • 43
  • 78
ken
  • 8,763
  • 11
  • 72
  • 133