SHA-256 object hashes cause fatal error on push #10040

Closed
opened 2025-11-02 08:56:34 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @h3xx on GitHub (Jan 2, 2023).

Description

Steps:

  1. Run these commands to set up your repository:
git init --object-format=sha256
touch test
git add .
git commit -m 'Initial commit'
  1. Push it to a gitea instance.

Results in fatal server-side error:

$ git push -vvv origin main
Pushing to codeberg.org:h3xx/test-sha256
fatal: protocol error: unexpected capabilities^{}
fatal: the remote end hung up unexpectedly
Gitea: Internal error

Note: that's literal ^{} garbage characters.

Expected:

  • A better error message. This one makes me feel like I broke your site.
  • OR (and I realize it's a long shot) support for SHA-256 object hashes

git 2.39.0

Gitea Version

latest

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

2.39.0

Operating System

No response

How are you running Gitea?

Codeberg.org

Database

None

Originally created by @h3xx on GitHub (Jan 2, 2023). ### Description Steps: 1. Run these commands to set up your repository: ```sh git init --object-format=sha256 touch test git add . git commit -m 'Initial commit' ``` 2. Push it to a gitea instance. Results in fatal server-side error: ``` $ git push -vvv origin main Pushing to codeberg.org:h3xx/test-sha256 fatal: protocol error: unexpected capabilities^{} fatal: the remote end hung up unexpectedly Gitea: Internal error ``` Note: that's literal `^{}` garbage characters. Expected: - A better error message. This one makes me feel like I broke your site. - OR (and I realize it's a long shot) support for SHA-256 object hashes git 2.39.0 ### Gitea Version latest ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version 2.39.0 ### Operating System _No response_ ### How are you running Gitea? Codeberg.org ### Database None
GiteaMirror added the issue/duplicate label 2025-11-02 08:56:34 -06:00
Author
Owner

@lafriks commented on GitHub (Jan 2, 2023):

Gitea currently does not support sha256 hashes

@lafriks commented on GitHub (Jan 2, 2023): Gitea currently does not support sha256 hashes
Author
Owner

@lafriks commented on GitHub (Jan 2, 2023):

Duplicate of #13794

@lafriks commented on GitHub (Jan 2, 2023): Duplicate of #13794
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10040