Gitlab shows error 500 after locally cloning repository
Hello folks,
after alot of struggle I found out that when you clone an repository from gitlab (CentOS 7) from its local path (/var/opt/gitlab/git-data/repositories/{path to your repo}) once (cloning is enough) that Gitlab is breaking with random Error 404 or Error 500 on project-page: overview and cannot load version information from files.
You can reproduce this behaviour very easy, simply clone any project with content from from described above.
You have to delete the project using ruby-console manually to be able to use gitlab again.
Every page displaying or loading project-details (even project-overview) is not able to load properly anymore after cloning the repository just once.
Before you ask - "Why I did clone on such an uncommon way?" Simple! Because my Gitlab server and my webserver is located on the same machine and I wanted to deploy a website using "git pull" or hooks.
But it felt somewhat overkill to me use SSH or to enter a password every time to deploy a local repository / resource and I thought gitlab is merely managing the existing repo so I thought oh well "what will happen". I thought its easier for deployment and had alot of struggle to find out cloning alone will cause this.
Most curious thing to me, I thought "git clone" is a pure "read-only" action to the origin repository, but apparently it is not. Anything in the origin repository must change when cloning (I checked permissions and owner and stuff but I could not find anything). Anything inside of config/data/objects must change which gives gitlab the creeps here.
It will result the project to end up with with the rare error "ActionView::Template::Error (object not found - no match for id" - to popup (entire google gives a total of 2 results with this error-message and with different causes/solutions, thatswhy im opening this ticket here).
Now my question, is this a bug in gitlab or im simply using the repositories wrong as its never intended to clone repositories that way?
I now got a workarround by adding a private-key without password on the server and applied a public-key to my gitlab-account and clone on the usual way using SSH and it works fine, but still I wanted to know if this is normal or the normal way to do this because using SSH for something on the same HDD seems a little bit ridiculous to me.
Thankswhy I would like to have your opinions on this if this can even be considered to be a bug and would love to dicsuss this werid behaviour of "git clone".
Thanks and sorry for this unusual ticket.