# 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:** 6\
**Page:** 1

<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:** [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/1 "2024-03-07T10:32:58Z")

</div>

Moin,  
bei Versuch von Version 6.5.6.0 zu updaten erhalte ich die Fehlermeldung „Cannot run „sync-recipes --force“: git not found.“. Git ist installiert und „DIRECTORY\_SEPARATOR“ ist auf „/“ gesetzt. Die Version 6.5.? konnte ich problemlos neu installieren und dafür war Git ja bereits Voraussetzung. Nur das Update klappt nicht. Hat jemand eine Idee an was das liegen könnte?

Hier nochmal die relevanten Zeilen aus dem Protokoll:

No security vulnerability advisories found.

In InstallRecipesCommand.php line 58:

[Symfony\Component\Console\Exception\RuntimeException]  
Cannot run „sync-recipes --force“: git not found.

Exception trace:  
at /var/www/k6799-1/htdocs/shopware/vendor/symfony/flex/src/Command/InstallRecipesCommand.php:58  
Symfony\Flex\Command\InstallRecipesCommand-\>execute() at phar:///var/www/k6799-1/htdocs/shopware/public/shopware-installer.phar.php/vendor/symfony/console/Command/Command.php:326  
Symfony\Component\Console\Command\Command-\>run() at phar:///var/www/k6799-1/htdocs/shopware/public/shopware-installer.phar.php/vendor/symfony/console/Application.php:1078  
Symfony\Component\Console\Application-\>doRunCommand() at phar:///var/www/k6799-1/htdocs/shopware/public/shopware-installer.phar.php/vendor/symfony/console/Application.php:324  
Symfony\Component\Console\Application-\>doRun() at phar:///var/www/k6799-1/htdocs/shopware/public/shopware-installer.phar.php/vendor/composer/composer/src/Composer/Console/Application.php:382  
Composer\Console\Application-\>doRun() at phar:///var/www/k6799-1/htdocs/shopware/public/shopware-installer.phar.php/vendor/symfony/console/Application.php:175  
Symfony\Component\Console\Application-\>run() at phar:///var/www/k6799-1/htdocs/shopware/public/shopware-installer.phar.php/vendor/composer/composer/src/Composer/Console/Application.php:145  
Composer\Console\Application-\>run() at phar:///var/www/k6799-1/htdocs/shopware/public/shopware-installer.phar.php/vendor/composer/composer/bin/composer:94  
include() at phar:///var/www/k6799-1/htdocs/shopware/public/shopware-installer.phar.php/vendor/bin/composer:119  
require() at /var/www/k6799-1/htdocs/shopware/public/shopware-installer.phar.php:37

symfony:recipes:install [–force] [–reset] [–] […]

---

<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  
}

---

<div class="post-metadata">

**Author:** ![welle](https://avatars.discourse-cdn.com/v4/letter/w/a9a28c/32.png) [@welle](https://forum.shopware.com/u/welle)\
**Post date:** [19. Oktober 2024 um 17:43 UTC](https://forum.shopware.com/t/fehlermeldung-beim-update-trotz-installiertem-git-cannot-run-sync-recipes-force-git-not-found/103246/3 "2024-10-19T17:43:36Z")

</div>

> [@DTSchneiderlein](#):
>
> in /htdocs/shopware/vendor/symfony/flex/src/Command/InstallRecipesCommand.php:

Hallo,  
ich habe auch dieses Problem (Update via Browser)  
Nun weiss ich nicht weiter, wo finde ich dieses /htdocs/shopware/vendor/symfony/flex/src/Command/InstallRecipesCommand.php: ?

Ich kann jetzt im Browser (Installer-Update) nur auf zurück klicken …

Kannst du mir weiterhelfen?

Bei mir geht es ums Update 6.6.7.0

besten Dank und Gruss  
Welle

---

<div class="post-metadata">

**Author:** ![Anotherone](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@Anotherone](https://forum.shopware.com/u/Anotherone)\
**Post date:** [20. Oktober 2024 um 14:59 UTC](https://forum.shopware.com/t/fehlermeldung-beim-update-trotz-installiertem-git-cannot-run-sync-recipes-force-git-not-found/103246/4 "2024-10-20T14:59:48Z")

</div>

Da musst Du per Shell oder FTP ran, im Shoproot wäre es dann vendor/symfony/flex/src/Command/InstallRecipesCommand.php

---

<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:** [21. Oktober 2024 um 04:53 UTC](https://forum.shopware.com/t/fehlermeldung-beim-update-trotz-installiertem-git-cannot-run-sync-recipes-force-git-not-found/103246/5 "2024-10-21T04:53:53Z")

</div>

Die Anpassung der Datei hat ab dem Update auf 6.6.5.1 nicht mehr funktioniert. Mein Provider hat sich dann bereit erklärt temporär „/usr/bin/“ als erlaubtes Zugriff einzustellen, damit ich das Update durchführen konnte. Da muss ich dann wohl jetzt bei jedem Update darum bitten. ☹

---

<div class="post-metadata">

**Author:** ![Anotherone](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@Anotherone](https://forum.shopware.com/u/Anotherone)\
**Post date:** [21. Oktober 2024 um 14:51 UTC](https://forum.shopware.com/t/fehlermeldung-beim-update-trotz-installiertem-git-cannot-run-sync-recipes-force-git-not-found/103246/6 "2024-10-21T14:51:12Z")

</div>

Dein Hoster hat Recht, exec darf trotz bzw. unabhängig von open\_basedir die Datei ausführen (sofern der User, unter dem der Webserver läuft, es darf), is\_executable ist dagegen von der Beschränkung durch open\_basedir betroffen.
