Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERR error overlaying repositories err="exit status 128" on Ubuntu Jammy #218

Closed
0xDEC0DE opened this issue Jun 29, 2024 · 5 comments
Closed

Comments

@0xDEC0DE
Copy link
Contributor

Gilt fails to run when installed on:

  • Ubuntu < 23.10
  • Debian < 12
  • Alpine < 3.17
  • RedHat < 8.7

It yields the error message:

ERR error overlaying repositories err="exit status 128"

This is not a Gilt error per se, but an incompatibility with the antediluvian versions of Git that come installed on these old, LTS Linux distros

Steps to reproduce

docker run --rm -it ubuntu:jammy
apt update
apt -y install git
git clone --bare --filter=blob:none --origin gilt https://github.com/docker-library/busybox.git /home/jenkins/.gilt/clone/cache/https---github.com-docker-library-busybox.git

Expected result

Cloning into bare repository '/home/jenkins/.gilt/clone/cache/https---github.com-docker-library-busybox.git'...
remote: Enumerating objects: 2132, done.
remote: Counting objects: 100% (1058/1058), done.
remote: Compressing objects: 100% (487/487), done.
remote: Total 2132 (delta 458), reused 900 (delta 442), pack-reused 1074
Receiving objects: 100% (2132/2132), 286.35 KiB | 1.86 MiB/s, done.
Resolving deltas: 100% (618/618), done.

Actual behavior

fatal: --bare and --origin gilt options are incompatible.

Workaround

  • Install/use Git 2.39 or later. This is the default in Debian 12, Ubuntu 23.10, Alpine 3.17, etc.
  • Use the equivalent/compatible command:
git -c clone.defaultRemoteName=gilt clone --bare --filter=blob:none https://github.com/docker-library/busybox.git /home/jenkins/.gilt/clone/cache/https---github.com-docker-library-busybox.git

Miscellany

Ubuntu 20.04 is supported until 2025, and 22.04 is supported until 2027, so this isn't the kind of thing that can be easily laughed off.

Apple has shipped comparatively-modern versions of Git for a long while now, making this issue difficult to spot in a development environment.

This issue very likely disappears completely of go-git ever ships a version that makes Issue #72 plausible.

0xDEC0DE pushed a commit to 0xDEC0DE/gilt that referenced this issue Jun 29, 2024
commit 21f7c3f uses a `git`
invocation that only works on Git 2.39 or newer; replace it with a
more backward-compatible command that should work on older versions
of Git.

Fixes: Issue retr0h#218
@0xDEC0DE
Copy link
Contributor Author

Truly ancient versions of Git (git version 2.25.1, shipped with Ubuntu Focal) do not have support for even the clone.defaultRemote config option; a truly long-form method will need to be devised.

0xDEC0DE pushed a commit to 0xDEC0DE/gilt that referenced this issue Jun 30, 2024
commit 21f7c3f uses a `git`
invocation that only works on Git 2.39 or newer; replace it with a
more backward-compatible command that should work on older versions
of Git.

Fixes: Issue retr0h#218
retr0h pushed a commit that referenced this issue Jul 1, 2024
commit 21f7c3f uses a `git`
invocation that only works on Git 2.39 or newer; replace it with a
more backward-compatible command that should work on older versions
of Git.

Fixes: Issue #218
@retr0h
Copy link
Owner

retr0h commented Jul 1, 2024

@0xDEC0DE Want a release with this sooner than later?

@0xDEC0DE
Copy link
Contributor Author

0xDEC0DE commented Jul 1, 2024

@0xDEC0DE Want a release with this sooner than later?

Sooner would be better, yes.

@0xDEC0DE
Copy link
Contributor Author

0xDEC0DE commented Jul 1, 2024

Fixed in #219

@0xDEC0DE 0xDEC0DE closed this as completed Jul 1, 2024
@retr0h
Copy link
Owner

retr0h commented Jul 2, 2024

@0xDEC0DE Want a release with this sooner than later?

v2.2.3 is out, thx for the fixes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants