Gitlab issues and tricks discussed

First of all I really love gitlab. It’s free, open-source and it’s a great tool to manage your repositories. But for some reason it’s also very fragile. Atleast my setup fails now and then because I updated my system or updated gitlab or for some other unknown reason. In this article I discuss my issues and solutions. Feel free to comment or post your own issue.

Gitlab.com Service

Let me start with a tip! If you don’t like to host your own gitlab because you get tired of all the issues and fixing or because your server is too slow to manage all your repositories then there is good news. Gitlab offers a totally free service, unlimited (private) repositories and unlimited disk space (max 1 gb per repository). That sounds good right! More info can be found here: https://about.gitlab.com/gitlab-com/

Issue #1: Cannot push to remote, hook declined

Let’s start with my first issue. First let me give you some background info. I run gitlab inside a VM that runs on Windows Server. My repositories are located on a NTFS formatted harddisk under Windows Server that I share with my VM. As VM I use VirtualBox. Now everything was setup perfectly and working correctly but after a while I got this error:

I navigated to my repository directory and found out that my hooks directory wasn’t a symlink anymore. So I deleted the current hooks directory and re-created the symlink:

Unfortunality this resulted in an error:

The error was caused by my VM. So it had nothing to do with gitlab but it did affect gitlab. I fixed it by going on my Windows Server machine to the directory were VirtualBox was installed. I closed my VM and run this command from the command-line:

Now restart your VM and create the symbolic links and try to push again. It should work now.

Leave a Comment.