-
Bug
-
Resolution: Unresolved
-
Minor
-
None
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
SHA256 object format is not yet supported by the git plugin. I don't have any immediate plans to add support for SHA256 object format. The last time I read information about SHA256 object format, it seemed like the git community was still trying to find the path that they want to follow for wider adoption of SHA256 object format.
You're welcome to start a pull request to add an option to use SHA256 object format. I suspect there will be many places that need to change in many plugins.
Short term, you could replace the use of the git plugin in your Pipeline with shell commands wrapped in a withCredentials block. That gives you complete control of command line git and its arguments.