[Sha 256] unable to create sha256 repository via CLI

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Users have the ability to create a project by using the CLI. However this fails when attempting to do so if using a local repository that has been created with SHA256

Where in the application are you seeing this issue?

Observing this via the CLI, with the assumption that group gitlab-qa-sandbox-group-2 exists.

$ git init --object-format=sha256 .
# Assume group gitlab-qa-sandbox-group-2 exists
$ git remote add origin http://gdk.test:3000/gitlab-qa-sandbox-group-2/my-test-project 
$ touch foobar && git add foobar && git commit -m "init"
$ git:(main) git push

Username for 'http://gdk.test:3000': root
Password for 'http://root@gdk.test:3000': 
warning: redirecting to http://gdk.test:3000/gitlab-qa-sandbox-group-2/my-test-project.git/
fatal: the receiving end does not support this repository's hash algorithm
fatal: the remote end hung up unexpectedly
error: failed to push some refs to 'http://gdk.test:3000/gitlab-qa-sandbox-group-2/my-test-project'

How did you expect the application to behave?

  • I expected the project to be created, and the object format be sha256

How did the application behave?

  • This results in an empty project being created, which uses sha1 by default.
  • As the project in GitLab is SHA1, we get the the receiving end does not support this repository's hash algorithm error
Edited by 🤖 GitLab Bot 🤖