You are not logged in.

#1 2018-11-27 20:18:57

slash_blog
Member
Registered: 2010-07-29
Posts: 15

[Solved] Error during git push to gitea server

I am getting the following error while making a git push to my gitea server

git push -v
Pushing to http://intranet/gitea/rand/repo-data.git
Enumerating objects: 28, done.
Counting objects: 100% (28/28), done.
Delta compression using up to 4 threads
Compressing objects: 100% (20/20), done.
Writing objects: 100% (20/20), 17.30 KiB | 1.73 MiB/s, done.
Total 20 (delta 7), reused 0 (delta 0)
POST git-receive-pack (17866 bytes)
error: remote unpack failed: unable to create temporary object directory
To http://intranet/gitea/rand/repo-data.git
 ! [remote rejected] master -> master (unpacker error)
error: failed to push some refs to 'http://intranet/gitea/rand/repo-data.git'

On the server side I can see the following:

Nov 27 22:50:17 randl-desk gitea[6094]: [Macaron] 2018-11-27 22:50:17: Started GET /rand/repo-data.git/info/refs?service=git-receive-pack for 172.16.1.11
Nov 27 22:50:17 randl-desk gitea[6094]: [Macaron] 2018-11-27 22:50:17: Completed GET /rand/repo-data.git/info/refs?service=git-receive-pack 401 Unauthorized in 17.929406ms
Nov 27 22:50:17 randl-desk gitea[6094]: [Macaron] 2018-11-27 22:50:17: Started GET /rand/repo-data.git/info/refs?service=git-receive-pack for 172.16.1.11
Nov 27 22:50:18 randl-desk gitea[6094]: [Macaron] 2018-11-27 22:50:18: Completed GET /rand/repo-data.git/info/refs?service=git-receive-pack 200 OK in 144.38621ms
Nov 27 22:50:18 randl-desk gitea[6094]: [Macaron] 2018-11-27 22:50:18: Started POST /rand/repo-data.git/git-receive-pack for 172.16.1.11
Nov 27 22:50:18 randl-desk gitea[6094]: [Macaron] 2018-11-27 22:50:18: Completed POST /rand/repo-data.git/git-receive-pack 200 OK in 73.76579ms

I have checked the permission in repo directory. Any idea what is the problem?

Last edited by slash_blog (2018-12-08 07:33:07)

Offline

#2 2018-11-28 01:57:21

randomguy
Member
Registered: 2007-06-19
Posts: 101

Re: [Solved] Error during git push to gitea server

slash_blog wrote:

I am getting the following error while making a git push to my gitea server

Nov 27 22:50:17 randl-desk gitea[6094]: [Macaron] 2018-11-27 22:50:17: Completed GET /rand/repo-data.git/info/refs?service=git-receive-pack 401 Unauthorized in 17.929406ms

I do not know anything about "gitea" but your log states clearly that the web server does reject some of the request right there. So maybe that is a starting point?

Offline

#3 2018-11-28 14:28:26

slash_blog
Member
Registered: 2010-07-29
Posts: 15

Re: [Solved] Error during git push to gitea server

randomguy wrote:

I do not know anything about "gitea" but your log states clearly that the web server does reject some of the request right there. So maybe that is a starting point?

Actually that I think is the error when git client first tries without credentials. Subsequently it succeeds, but still there is push error. I have tried multiple things but nothing seems to help.

Offline

#4 2018-12-08 07:32:30

slash_blog
Member
Registered: 2010-07-29
Posts: 15

Re: [Solved] Error during git push to gitea server

Ok this was not gitea issue. This suddenly started happening since system update. It turned out that the issue was that I have custom repository (ROOT) location, and in the systemd service file the following setting:

ProtectSystem=strict

was making the custom location read only. Created /etc/systemd/system/gitea.service.d/override.conf file with the following content:

[Service]
ReadWritePaths=<custom-path>/gitea/repos

to resolve the issue. The above ReadWritePaths is same as ROOT in gitea’s app.ini.
This will allow gitea to write to custom location. Though there is no indication from gitea about any write failure (even in debug mode) - which is kind of strange.

Offline

Board footer

Powered by FluxBB