Git Repo Locked

When I push to the newly synced gitlab repo I get below error.
I currently only have 1 user registered for SVN and Gitlab which should make it easy for the translation.
I saw the gitlab registered the hooks when i Initialized the repo

2:Rugged::OSError: failed to rename lockfile to '/var/opt/gitlab/git-data/repositories/@hashed/2c/62 /2c624232cdd221771294dfbb310aca000a0df6ac8b66b696d90ef06fdefb64a3.git/objects/f0/47c8bae8a6714fccee04168de6a81315b13758': Permission denied. debug_error_string:{"created":"@1598974113.657098419","description":"Error received from peer unix:/var/opt/gitlab/gitaly/gitaly.socket","file":"src/core/lib/surface/call.cc","file_line":1055,"grpc_message":"Rugged::OSError: failed to rename lockfile to '/var/opt/gitlab/git-data/repositories/@hashed/2c/62/2c624232cdd221771294dfbb310aca000a0df6ac8b66b696d90ef06fdefb64a3.git/objects/f0/47c8bae8a6714fccee04168de6a81315b13758': Permission denied","grpc_status":2}

Im thinking I will need to open the permissions on the git repo but are confused why its needed if that is the case.

Hi Christian,

could you advise on behalf of which user does the SubGit daemon run? That is, which user ran ‘subgit install’ to establish the mirror and start the daemon? The issue picture looks very similar to situation when SubGit daemon runs on behalf of ‘root’ – since GitLab runs on behalf of ‘git’ user, it cannot change (and sometimes even access) files that are created by root. If that’s the case, you would need to stop the daemon:

subgit shutdown <path to git repository>

then change the files owner in the repository:

chown -R git:git <path to git repository>

and restart the SubGit daemon on behalf of ‘git’:

su git
subgit install <path to git repository>
1 Like

oh snap … that worked :)
Thanks Ildar!!!