access DENIED
Created by: zombified
Not sure how to reproduce this issue, and I do have a kludge for a fix. I was actually wondering if anyone could possibly give an explanation, or at least let me know how to clean it up properly.
A little about the setup: I first encountered this issue on a version 2.7 w/ SQLite db configured, shortly after I experienced the issue it was upgraded to 2.8 w/ a MySQL db. I don't think this is a specific issue with the conversion.
The Error
The error I was getting was something along the lines of:
$ git clone ssh://gitserver/repository.git Cloning into 'repository... R access for repository DENIED to user1_1346088499 (Or there may be no repository at the given path. Did you spell it correctly?) fatal: The remote end hung up unexpectedly
I'm not sure what occurred initially to cause this error -- I had just pushed to the repository in question 5 minutes previous to this error, and suddenly started getting errors similar to this. Other users were still able to operate correctly, only my user seemed to be affected.
My Diagnosis
Somehow, my account had a SSH key registered even though gitlab wasn't showing it, IE:
- I removed all my keys
- A key for my user was in /home/git/.gitlab/keydir/
- There was an entry for the key in /home/git/.gitlab/conf/gitolite.conf with no permissions at all
- There was an entry for the key in /home/git/.ssh/authorized_keys
So, somehow my key must have become disassociated with my user it gitlab, but didn't get deleted in gitolite?
I have, previously to this error, deleted some keys and re-added the same ones (this was during a testing period that I was exploring and experimenting with gitlab), but I was still able to push/pull/clone/etc afterwards.
My Kludge of A Fix That Probably Isn't Appropriate
Commented out the entry for the key in /home/git/.ssh/authorized_keys and added a new key for my user.
Questions
Is there anything more that I should do to cleanup the invalid entry? Does anyone have insight on how this issue cropped up?