# \[SOLVED\] Git-lfs upload repeats infinitely

**URL:** https://forum.gitea.com/t/solved-git-lfs-upload-repeats-infinitely/635
**Category:** Install/Maintain/Configure
**Created:** [October 20, 2018, 11:46am UTC](https://forum.gitea.com/t/solved-git-lfs-upload-repeats-infinitely/635 "2018-10-20T11:46:17Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Herschel](https://avatars.discourse-cdn.com/v4/letter/h/ecd19e/32.png) [@Herschel](https://forum.gitea.com/u/Herschel)
#### Post date: [October 20, 2018, 11:46am UTC](https://forum.gitea.com/t/solved-git-lfs-upload-repeats-infinitely/635/1 "2018-10-20T11:46:17Z")

</div>

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 🙂  
Joel

---

<div class="post-metadata">

### Author: ![lafriks](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/lafriks/32/3004_2.png) [@lafriks](https://forum.gitea.com/u/lafriks)
#### Post date: [October 20, 2018, 6:49pm UTC](https://forum.gitea.com/t/solved-git-lfs-upload-repeats-infinitely/635/2 "2018-10-20T18:49:23Z")

</div>

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

```auto
client_max_body_size 0;

```

Also you could need to increase receive timeouts

---

<div class="post-metadata">

### Author: ![Herschel](https://avatars.discourse-cdn.com/v4/letter/h/ecd19e/32.png) [@Herschel](https://forum.gitea.com/u/Herschel)
#### Post date: [October 20, 2018, 9:29pm UTC](https://forum.gitea.com/t/solved-git-lfs-upload-repeats-infinitely/635/3 "2018-10-20T21:29:14Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![Herschel](https://avatars.discourse-cdn.com/v4/letter/h/ecd19e/32.png) [@Herschel](https://forum.gitea.com/u/Herschel)
#### Post date: [October 21, 2018, 11:53am UTC](https://forum.gitea.com/t/solved-git-lfs-upload-repeats-infinitely/635/4 "2018-10-21T11:53:11Z")

</div>

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
```

---

<div class="post-metadata">

### Author: ![techknowlogick](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/techknowlogick/32/4706_2.png) [@techknowlogick](https://forum.gitea.com/u/techknowlogick)
#### Post date: [November 24, 2018, 5:11pm UTC](https://forum.gitea.com/t/solved-git-lfs-upload-repeats-infinitely/635/5 "2018-11-24T17:11:32Z")

</div>


