Push failed due to path error

POST git-receive-pack (1261 bytes)
remote:
remote: SubGit ERROR REPORT (SubGit version 3.3.6 (‘Bobique’) build #4276):
remote:
remote: You’ve received this message because SubGit (http://subgit.com/) is installed in your repository
remote: and an error that needs to be dealt with has occurred in SubGit translation engine.
remote:
remote: TEMPORARY ERROR:
remote: Cannot open file ‘/var/opt/gitlab/git-data/repositories/root/repo.git/./subgit/logs/pre-receive-hook.0.log.lck’ : Permission denied
remote:
remote: CURRENT STATE:
remote: Both Git and Subversion repository are open for pushes or commits.
remote: Your commit was not committed, but you may retry it.
remote: TO RECOVER:
remote: A) Address the problem if possible and then retry commit
remote: OR
remote: B) Run on the server
remote: $ subgit uninstall /var/opt/gitlab/git-data/repositories/root/repo.git/.
remote:
remote: IMPORTANT: As soon as SubGit is uninstalled, both Git and Subversion repositories
remote: will become open, but no synchronization will take place.
remote:
remote: TO REPORT:
remote: Report an issue at http://issues.tmatesoft.com/
remote: You may find logs on the server at ‘/var/opt/gitlab/git-data/repositories/root/repo.git/./subgit/logs’
remote:
remote: THANK YOU!
remote: [2019-06-25 09:29:52.393][pre-receive] SubGit version 3.3.6 (‘Bobique’)
remote: [2019-06-25 09:29:52.393][pre-receive] Command name: pre-receive.
remote: [2019-06-25 09:29:52.393][pre-receive] Current user: git.
remote: [2019-06-25 09:29:52.394][pre-receive] SVN/SubGit repository path is resolved to ‘/var/opt/gitlab/git-data/repositories/root/repo.git/.’
remote: [2019-06-25 09:29:52.394][pre-receive] Git repository path is resolved to ‘/var/opt/gitlab/git-data/repositories/root/repo.git’
remote: [2019-06-25 09:29:52.394][pre-receive] Checking hook input, input size = 100
remote: [2019-06-25 09:29:52.394][pre-receive] Hook input: dc9b3d0d2ac180aa6f81453ab41804d9e928c31d 061fe9b6682c516e0478ff0b621af3a0cfb939f0 refs/heads/master
remote:
remote: [2019-06-25 09:29:52.394][pre-receive] The input doesn’t contain forbidden references.
remote: [2019-06-25 09:29:52.394][pre-receive] Loading repository options for path: ‘/var/opt/gitlab/git-data/repositories/root/repo.git/.’
remote: [2019-06-25 09:29:52.394][pre-receive] Loaded config option daemon.pidFile = ‘subgit/daemon.pid’
remote: [2019-06-25 09:29:52.394][pre-receive] Loaded config option daemon.classpath = ‘/usr/share/java/subgit/jansi-1.6.jar:/usr/share/java/subgit/slf4j-nop-1.7.12.jar:/usr/share/java/subgit/unirest-java-1.3.0.jar:/usr/share/java/subgit/jetty-server-9.4.11.v20180605.jar:/usr/share/java/subgit/jetty-servlet-9.4.11.v20180605.jar:/usr/share/java/subgit/jersey-server-2.27.jar:/usr/share/java/subgit/jersey-hk2-2.27.jar:/usr/share/java/subgit/jersey-container-jetty-servlet-2.27.jar:/usr/share/java/subgit/jersey-media-json-jackson-2.27.jar:/usr/share/java/subgit/svnkit-1.10.1-snapshot20190315103151.jar:/usr/share/java/subgit/org.eclipse.jgit-5.0.3-sgk.jar:/usr/share/java/subgit/annotations-7.0.3.jar:/usr/share/java/subgit/slf4j-api-1.7.12.jar:/usr/share/java/subgit/httpclient-4.3.jar:/usr/share/java/subgit/httpasyncclient-4.0-beta4.jar:/usr/share/java/subgit/httpmime-4.3.jar:/usr/share/java/subgit/json-20090211.jar:/usr/share/java/subgit/javax.servlet-api-3.1.0.jar:/usr/share/java/subgit/jetty-http-9.4.11.v20180605.jar:/usr/share/java/subgit/jetty-io-9.4.11.v20180605.jar:/usr/share/java/subgit/jetty-security-9.4.11.v20180605.jar:/usr/share/java/subgit/jersey-common-2.27.jar:/usr/share/java/subgit/jersey-client-2.27.jar:/usr/share/java/subgit/javax.ws.rs-api-2.1.jar:/usr/share/java/subgit/jersey-media-jaxb-2.27.jar:/usr/share/java/subgit/javax.annotation-api-1.2.jar:/usr/share/java/subgit/javax.inject-2.5.0-b42.jar:/usr/share/java/subgit/validation-api-1.1.0.Final.jar:/usr/share/java/subgit/hk2-locator-2.5.0-b42.jar:/usr/share/java/subgit/jersey-container-servlet-2.27.jar:/usr/share/java/subgit/jersey-container-jetty-http-2.27.jar:/usr/share/java/subgit/jetty-webapp-9.4.7.v20170914.jar:/usr/share/java/subgit/jersey-entity-filtering-2.27.jar:/usr/share/java/subgit/jackson-annotations-2.8.10.jar:/usr/share/java/subgit/jackson-databind-2.8.10.jar:/usr/share/java/subgit/jackson-module-jaxb-annotations-2.8.10.jar:/usr/share/java/subgit/sequence-library-1.0.4.jar:/usr/share/java/subgit/sqljet-1.1.12.jar:/usr/share/java/subgit/jna-4.1.0.jar:/usr/share/java/subgit/jna-platform-4.1.0.jar:/usr/share/java/subgit/trilead-ssh2-1.0.0-build221.jar:/usr/share/java/subgit/jsch.agentproxy.connector-factory-0.0.7.jar:/usr/share/java/subgit/jsch.agentproxy.svnkit-trilead-ssh2-0.0.7.jar:/usr/share/java/subgit/lz4-java-1.4.1.jar:/usr/share/java/subgit/jsch-0.1.54.jar:/usr/share/java/subgit/JavaEWAH-1.1.6.jar:/usr/share/java/subgit/httpcore-4.3.jar:/usr/share/java/subgit/commons-logging-1.1.3.jar:/usr/share/java/subgit/commons-codec-1.6.jar:/usr/share/java/subgit/httpcore-nio-4.3-beta2.jar:/usr/share/java/subgit/jetty-util-9.4.11.v20180605.jar:/usr/share/java/subgit/osgi-resource-locator-1.0.1.jar:/usr/share/java/subgit/aopalliance-repackaged-2.5.0-b42.jar:/usr/share/java/subgit/hk2-api-2.5.0-b42.jar:/usr/share/java/subgit/hk2-utils-2.5.0-b42.jar:/usr/share/java/subgit/javassist-3.22.0-CR2.jar:/usr/share/java/subgit/jersey-container-servlet-core-2.27.jar:/usr/share/java/subgit/jetty-continuation-9.4.7.v20170914.jar:/usr/share/java/subgit/jetty-xml-9.4.7.v20170914.jar:/usr/share/java/subgit/jackson-core-2.8.10.jar:/usr/share/java/subgit/antlr-runtime-3.4.jar:/usr/share/java/subgit/jsch.agentproxy.core-0.0.7.jar:/usr/share/java/subgit/jsch.agentproxy.usocket-jna-0.0.7.jar:/usr/share/java/subgit/jsch.agentproxy.usocket-nc-0.0.7.jar:/usr/share/java/subgit/jsch.agentproxy.sshagent-0.0.7.jar:/usr/share/java/subgit/jsch.agentproxy.pageant-0.0.7.jar:/usr/share/java/subgit/javax.inject-1.jar:/usr/share/java/subgit/translator-3.3.6.jar:/usr/share/java/subgit/svngitkit-2.3.0-snapshot20190315105100.jar’
remote: [2019-06-25 09:29:52.394][pre-receive] Loaded config option daemon.javaOptions = ‘null’
remote: [2019-06-25 09:29:52.394][pre-receive] Loaded config option core.logs = ‘subgit/logs’
remote: [2019-06-25 09:29:52.394][pre-receive] Loaded config option core.errorReport = ‘null’
remote: [2019-06-25 09:29:52.394][pre-receive] Loaded config option core.javaHome = ‘null’
remote: [2019-06-25 09:29:52.394][pre-receive] Loaded config option daemon.javaHome = ‘null’
remote: [2019-06-25 09:29:52.394][pre-receive] Loaded config option core.logLevel = ‘null’
remote: [2019-06-25 09:29:52.394][pre-receive] Cannot open file ‘/var/opt/gitlab/git-data/repositories/root/repo.git/./subgit/logs/pre-receive-hook.0.log.lck’ : Permission denied
remote: [2019-06-25 09:29:52.394][pre-receive] at hook_log_configure_file (log.c:245)
remote: [2019-06-25 09:29:52.394][pre-receive] at hook_configure_logging (hook.c:169)
remote: [2019-06-25 09:29:52.394][pre-receive] at internal_pre_receive (pre-receive.c:213)
remote: [2019-06-25 09:29:52.394][pre-receive]

I noticed that there is a strange ‘./’ in the middle of the path at “/var/opt/gitlab/git-data/repositories/root/repo.git/./subgit/logs/pre-receive-hook.0.log.lck”. I think it may be the reason why push failed.

Hello

Most probably it’s indeed a permissions issue, this often happens if the initial installation was performed on behalf of a user other than ‘git’ – in this case files in the repository are owned by the other user and ‘git’ (which is user GitLab uses for its operations) cannot write those files. Please make sure that files in the repository are owned by ‘git’ user and try to push again after that.

@ildarhm I chowned entire folder to git, it works. Thank you