You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot upload / edit files via web interface after upgrading from GOGS 13 to 14.1 #8183
Cannot upload / edit files via GOGS web interface. This happens "95%" of the time - very occasionally, it works, but almost always it fails.
To reproduce
Attempt to upload a file via the GOGS web interface, or edit an existing file (eg editing a README.md) the browser displays the error such as "Failed to update/create file 'ReadMe.md' with error: internal server error"
And the gogs.log file shows [ERROR] [...gs/internal/route/repo/editor.go:511 UploadFilePost()] Failed to upload files: discard local r branch[master] changes: reset [revision: origin/master]: exit status 128 - fatal: option '--end-of-options' must come before non-option arguments
Expected behavior
In versions previous to GOGS 14, uploading files and editing files worked fine.
When editing, the error in the log file is similar : [ERROR] [...gs/internal/route/repo/editor.go:281 editFilePost()] Failed to update repo file: discard local repo branch[master] changes: reset [revision: origin/master]: exit status 128 - fatal: option '--end-of-options' must come before non-option arguments
And previewing changes again results in a similar error in the log : [ERROR] [...gs/internal/route/repo/editor.go:317 DiffPreviewPost()] get diff preview: discard local repo branch[master] changes: reset [revision: origin/master]: exit status 128 - fatal: option '--end-of-options' must come before non-option arguments
Activity
IJeffray commentedon Feb 18, 2026
When editing, the error in the log file is similar : [ERROR] [...gs/internal/route/repo/editor.go:281 editFilePost()] Failed to update repo file: discard local repo branch[master] changes: reset [revision: origin/master]: exit status 128 - fatal: option '--end-of-options' must come before non-option arguments
IJeffray commentedon Feb 18, 2026
And previewing changes again results in a similar error in the log : [ERROR] [...gs/internal/route/repo/editor.go:317 DiffPreviewPost()] get diff preview: discard local repo branch[master] changes: reset [revision: origin/master]: exit status 128 - fatal: option '--end-of-options' must come before non-option arguments
unknwon commentedon Feb 18, 2026
Thanks for reporting! Looks like something is funky when shelling out to git. Gonna take a look.
IJeffray commentedon Feb 19, 2026
A quick fix - thanks! Any ETA on next release schedule?
unknwon commentedon Feb 19, 2026
Hey, all release artifacts of 0.14.2 were out yesterday!