[SOLVED] Git-lfs upload repeats infinitely


#1

Hi

I have gitea running on a raspberry pi and have git-lfs configured the following way:

LFS_START_SERVER = true
LFS_CONTENT_PATH = /mnt/Passport/gitea/data/lfs
LFS_JWT_SECRET   = ****************************
OFFLINE_MODE     = false
ENABLE_GZIP      = true
LFS_HTTP_AUTH_EXPIRY = 120m

When trying to push smaller (< 20 Mb) files to git-lfs everything is fine but when I try to upload files that are larger than 400 Mb there seems to be an infinity loop and instead of uploading just 400 Mb the amount uploaded seems to be unbounded i.e. I typically force quit it after a few gigabytes.

I have set the log level to debug but the only thing appearing in the log is this:

2018/10/20 11:36:01 [D] Session ID: **************
2018/10/20 11:36:01 [D] CSRF Token: *********************
2018/10/20 11:36:01 [D] LFS request - Method: POST, URL: /user/repolink.git/info/lfs/objects/batch, Status 200
2018/10/20 11:37:57 [...routers/repo/http.go:153 HTTP()] [E] invalid credentials

What am I doing wrong here?

Thanks for your help :slight_smile:
Joel


#2

Do you use reverse proxy? Could be that you have to increase max recieved body size. Example in nginx you can set:

client_max_body_size 0;

Also you could need to increase receive timeouts


#3

It is happening both if connecting through a reverse proxy (max body size is set to 40 Gb) and connecting directly to gitea.

How do I increase the receive timeouts in gitea?


#4

I have added the following lines to the git config and my problem seems to have been solved. I don’t know which line has actually solved it though:

[http]
	postBuffer = 624288000
[lfs]
	concurrenttransfers = 10
	activitytimeout = 3600
	dialtimeout = 3600
	keepalive = 3600
	tlstimeout = 3600