Skip to content

Cannot upload / edit files via web interface after upgrading from GOGS 13 to 14.1 #8183

Closed
gogs/git-module
#134

Description

@IJeffray

Gogs version

14.1

Git version

  • Server: Debian 12 (git 2.39.5)
  • Client: Debian 12 (git 2.39.5)

Operating system

Debian 12

Database

default

Describe the bug

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.

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added
    💊 bug
    on Feb 18, 2026
  2. IJeffray commented on Feb 18, 2026

    @IJeffray
    Author

    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

  3. IJeffray commented on Feb 18, 2026

    @IJeffray
    Author

    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

  4. unknwon commented on Feb 18, 2026

    @unknwon
    Member

    Thanks for reporting! Looks like something is funky when shelling out to git. Gonna take a look.

  5. self-assigned this
    on Feb 18, 2026
  6. IJeffray commented on Feb 19, 2026

    @IJeffray
    Author

    A quick fix - thanks! Any ETA on next release schedule?

  7. unknwon commented on Feb 19, 2026

    @unknwon
    Member

    Hey, all release artifacts of 0.14.2 were out yesterday!

  8. locked as resolved and limited conversation to collaborators on May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

💊 bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions