# Fehlermeldung beim Update trotz installiertem Git "Cannot run "sync-recipes --force": git not found."

**URL:** https://forum.shopware.com/t/fehlermeldung-beim-update-trotz-installiertem-git-cannot-run-sync-recipes-force-git-not-found/103246
**Category:** Administration
**Created:** [7. März 2024 um 10:32 UTC](https://forum.shopware.com/t/fehlermeldung-beim-update-trotz-installiertem-git-cannot-run-sync-recipes-force-git-not-found/103246 "2024-03-07T10:32:58Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![DTSchneiderlein](https://avatars.discourse-cdn.com/v4/letter/d/ac91a4/32.png) [@DTSchneiderlein](https://forum.shopware.com/u/DTSchneiderlein)
#### Post date: [13. März 2024 um 22:04 UTC](https://forum.shopware.com/t/fehlermeldung-beim-update-trotz-installiertem-git-cannot-run-sync-recipes-force-git-not-found/103246/2 "2024-03-13T22:04:54Z")

</div>

Ich antworte mir mal selbst, weil ich mithilfe einer Facebook-Gruppe und vor allem mithilfe meines Providers eine Lösung finden konnte:

Git wird nicht gefunden, weil der Befehl

is\_executable(‚/usr/bin/git‘)

im Update Skript von Shopware durch open\_basedir (Kein Zugriff auf /usr/bin/) unterbunden wird. In der Folge wird die Fehlermeldung „Cannot run „sync-recipes --force“: git not found.“ ausgegeben.

Sofern Git sicher installiert ist, kann das Update nach Auskommentieren der folgenden Zeilen durchgeführt werden:

in /htdocs/shopware/vendor/symfony/flex/src/Command/InstallRecipesCommand.php:

/\*  
exec(‚git --version‘, $output, $retval);  
if ($retval === 0) {  
// Git ist verfügbar  
}  
else {  
// Git ist nicht verfügbar  
}  
\*/

und in /htdocs/shopware/vendor/symfony/flex/src/Command/UpdateRecipesCommand.php

/\*  
if (!@is\_executable(strtok(exec($win ? ‚where git‘ : ‚command -v git‘), \PHP\_EOL))) {  
throw new $runtimeExceptionClass(‚Cannot run „recipes:update“: git not found.‘);  
\*/

Und am Ende noch einen Hinweis von meinem Provider (fürs Shopware-Team): Diese Prüfung hätte man anders lösen können, in dem man die Prüfung direkt per exec durchführen würde:

exec(‚git --version‘, $output, $retval);  
if ($retval === 0) {  
// Git ist verfügbar  
}  
else {  
// Git ist nicht verfügbar  
}

---

_[View the full topic](https://forum.shopware.com/t/fehlermeldung-beim-update-trotz-installiertem-git-cannot-run-sync-recipes-force-git-not-found/103246)._
