Skip to content

[JENKINS-73504] Unable to use a remote git repository which uses SHA256 hashing - fatal: mismatched algorithms: client sha1; server sha256 #1687

@jenkins-infra-bot

Description

@jenkins-infra-bot

Hi,

I'm trying to set up a new build job which need to do a checkout from a forgejo/gitea repository.
This repository was created with a SHA256 hash algorithm.

When the jenkins buildjob runs for the first time it creates a local repositiory using the following command:

git init /buildsystem/.jenkins/....

This command creates the local repository with the default hash algorithm, SHA1.
Because of this, it is incompatible with the remote repo, resulting in the following error when fetching the repo.

fatal: mismatched algorithms: client sha1; server sha256

The complete build output: JENKINS-73504">jenkins_git_sha256.txt

Is SHA256 hashing supported, and if not, can it be added?
The local repo creation should be done with the following command:

git init --object-format=sha256 /buildsystem/.jenkins/....

Regards,

Tom


Originally reported by toms, imported from: Unable to use a remote git repository which uses SHA256 hashing - fatal: mismatched algorithms: client sha1; server sha256
  • status: Open
  • priority: Minor
  • component(s): git-client-plugin
  • resolution: Unresolved
  • votes: 2
  • watchers: 4
  • imported: 20251211-071809
Raw content of original issue

Hi,

I'm trying to set up a new build job which need to do a checkout from a forgejo/gitea repository. This repository was created with a SHA256 hash algorithm.

When the jenkins buildjob runs for the first time it creates a local repositiory using the following command:

git init /buildsystem/.jenkins/....

This command creates the local repository with the default hash algorithm, SHA1. Because of this, it is incompatible with the remote repo, resulting in the following error when fetching the repo.

fatal: mismatched algorithms: client sha1; server sha256

The complete build output: jenkins_git_sha256.txt

Is SHA256 hashing supported, and if not, can it be added? The local repo creation should be done with the following command:

git init --object-format=sha256 /buildsystem/.jenkins/....

Regards,

Tom

1 attachment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions