archi-modelrepository-plugin: git-lfs not found on path of macos users
On macos, users will often use homebrew to install software like git-lfs. Homebrew must add its /opt/homebrew/bin/ folder (on aarch64) on the PATH env var, which is usually done through shell startup scripts like ~/.zshrc, ~/.zprofile etc. Unfortunately, these scripts aren’t sourced for gui applications, more specifically by the launchd daemon manager through which gui apps are started. This results in confusing behavior for macos users as they expect git-lfs to be correctly installed and don’t necessarily understand that gui apps don’t source their shell startup scripts.
Proposal: accommodate users for this issue and suggest solutions.
This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'pre-push' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks').
at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:159)
at org.archicontribs.modelrepository.grafico.ArchiRepository.pushToRemote(ArchiRepository.java:211)
at org.archicontribs.modelrepository.actions.PushModelAction.push(PushModelAction.java:163)
at org.archicontribs.modelrepository.actions.PushModelAction$1$1.run(PushModelAction.java:92)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:434)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:354)
at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:470)
at org.archicontribs.modelrepository.actions.PushModelAction$1.run(PushModelAction.java:78)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:132)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4382)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4005)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1042)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:152)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:639)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:546)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:173)
at com.archimatetool.editor.Application.start(Application.java:74)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:668)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:605)
at org.eclipse.equinox.launcher.Main.run(Main.java:1481)
Caused by: org.eclipse.jgit.errors.TransportException: Rejected by "pre-push" hook.
This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'pre-push' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks').
at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:171)
at org.eclipse.jgit.transport.Transport.push(Transport.java:1385)
at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:149)
... 32 more
Caused by: org.eclipse.jgit.api.errors.AbortedByHookException: Rejected by "pre-push" hook.
This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'pre-push' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks').
at org.eclipse.jgit.hooks.GitHook.handleError(GitHook.java:195)
at org.eclipse.jgit.hooks.GitHook.doRun(GitHook.java:173)
at org.eclipse.jgit.hooks.PrePushHook.call(PrePushHook.java:85)
at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:169)
... 34 more
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 22 (14 by maintainers)
Commits related to this issue
- Set hooksPath to null - This will effectively disable any global git hooks that might cause problems - See https://github.com/archimatetool/archi-modelrepository-plugin/issues/231 — committed to archimatetool/archi-modelrepository-plugin by Phillipus 2 years ago
- Set hooksPath to null - This will effectively disable any global git hooks that might cause problems - See https://github.com/archimatetool/archi-modelrepository-plugin/issues/231 — committed to archimatetool/archi-modelrepository-plugin2 by Phillipus 2 years ago
- Set hooksPath to null - This will effectively disable any global git hooks that might cause problems - See https://github.com/archimatetool/archi-modelrepository-plugin/issues/231 — committed to archimatetool/archi-modelrepository-plugin2 by Phillipus 2 years ago
- Set hooksPath to null - This will effectively disable any global git hooks that might cause problems - See https://github.com/archimatetool/archi-modelrepository-plugin/issues/231 — committed to archimatetool/archi-modelrepository-plugin by Phillipus 2 years ago
- Set hooksPath to null - This will effectively disable any global git hooks that might cause problems - See https://github.com/archimatetool/archi-modelrepository-plugin/issues/231 — committed to archimatetool/archi-modelrepository-plugin2 by Phillipus 2 years ago
Oh sorry about that, my bad.
Thanks @Phillipus for the quick reaction and fix. I’ll test it out.
On my side I sorted things out by making the graphical apps use a similar PATH env var as the cli tools’ one with
There is a lot of content online about using
launchctlto modify the PATH env var. But most of it is not working on my macos version 15.x.That said, disabling the user git hooks is probably a good idea for Archi as they could have unintended effects.