Moving repository from one gitlab server to another, now I can’t pushMay 19th, 2015 | By admin | Category: Random Musings
Do I used SCP to copy a repo from one server over to another today. What I needed to do was to create the repo on the new server first inside Gitlab, and then copy eveyrthing over top of it from the other server. Unfortunately upon doing so I was greeted with the following message:
remote: hooks/pre-receive:15:in `require_relative’: cannot load such file — /var/opt/gitlab/git-data/repositories/user/repo.git/lib/gitlab_access (LoadError)
The reason was that the symlinks for repo.git/hooks was turned into a static directory and copied over. I needed to delete the static hooks dir and replace it with the same sym link found in all the other repos on this server. Did that and problem solved. Oh and make sure you chown you newly copied directories to git.git as well.