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

mirror-resources uses host's git #3541

Open
moosecanswim opened this issue Feb 24, 2025 · 2 comments
Open

mirror-resources uses host's git #3541

moosecanswim opened this issue Feb 24, 2025 · 2 comments

Comments

@moosecanswim
Copy link

Environment

Device and OS: Rockey9
App version: 0.49.0
Kubernetes distro being used: rke2 1.29
Other:

Steps to reproduce

  1. Export Control Plane address, node port, and registry auth
  2. Make sure git is not installed on machine
  3. Run a zarf package mirror-resources

Expected result

I expected zarf to push the images and gitremotes however i got an error on git. Seems mirror-resources uses the host's git bin. This is different than when you use zarf package deploy which seems to use a packaged git library.

Actual Result

2025-02-24 16:47:05 INF pushing repository to server repo=https://repo1.dso.mil/big-bang/[email protected] server=
2025-02-24 16:47:07 ERR unable to push repo https://repo1.dso.mil/big-bang/[email protected] to the Git Server: All attempts fail:
#1: unable to fetch the git repo prior to push: exec: "git": executable file not found in $PATH

Visual Proof (screenshots, videos, text, etc)

Severity/Priority

Additional Context

Add any other context or screenshots about the technical debt here.

@brandtkeller
Copy link
Contributor

To my knowledge - the use of the hosts git is only a fallback mechanism when the process cannot be supported by the go-git library.

Looking at your logs and the faq and example I believe the git url you are using should be supported by go-git - So there is definitely something to investigate further.

@AustinAbro321
Copy link
Contributor

@moosecanswim The issue is you need to use the --git-url when using the zarf package mirror-resources command.

Mirror resources is not intuitive as it is now and should require these flags or pull from the registry / git info directly from Zarf state. We have an issue for this - #2389, this is a good note to raise the priority of it, should be simple to implement.

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

3 participants