Closed handplant closed 5 months ago
The repository path in your local development environment is likely not at /Users/...
. When using DDEV, for example, the path will be /var/www/html
, which you can verify by running ddev ssh
and then pwd
. It might be easier, however, to use the @root
alias, which points to the route project inside the container. See https://craftcms.com/docs/5.x/configure.html#aliases
No, I don't use DDEV. I use Laravel Herd and I have two repositories and project paths: one for the Craft CMS (playground5) itself and one for the static site (playground5-static), as described in the screenshot.
Can you please check the value of PWD
under Utilities → PHP Info in the CP?
Under "Utilities → PHP Info," there is no pwd entry. However, my path should be correct. See screenshot.
You’re right, the path does look correct, so it may be a problem with the path to the Git binary.
It looks like you’re on MacOS. Can you check whether running which git
returns /usr/bin/git
or something else? And please check whether git status
runs successfully?
I installed git using Homebrew: /opt/homebrew/bin/git
. git status
is correct. See screenshot.
Can please manually add the following above line 195 and share the stack trace? https://github.com/putyourlightson/craft-blitz/blob/87863bbcc32bc72da6fbf3599fea88cfd3a6f634/src/drivers/deployers/GitDeployer.php#L195
throw $exception;
I added throw $exception;
and then navigated to http://playground5.test/admin/settings/plugins/blitz?site=de
in the control panel. This is where the error occurs.
Thanks, that unfortunately doesn’t give any clues.
Can you please try defining the Git executable path using the commands
config setting as follows? It should be auto-detected but perhaps this is not working.
// The paths to executable shell commands.
'commands' => [
'git' => '/opt/homebrew/bin/git',
],
Hey, that helps. I was able to successfully deploy the data to a GitHub repo. Thanks a lot for your effort!
Great to hear! I’m not sure why it was not correctly auto-detected, possibly a permission issue.
Bug Report
The error
Error connecting to repository: Exit code: 127 while executing: 'LC_ALL=C '-c' user.name=handplant '-c' user.email=andi.grether@gmail.com remote '--verbose' with reason: sh: -c: command not found
occurs. Shouldn't -c be without quotation marks, or is there another issue?The paths to the local repo are correct.
Thanks in advance!
Diagnostics Report
Application Info
Installed Plugins
Loaded Modules
Blitz Plugin Settings
Recommendations
Site Tracking [#1]
Site Tracking [#2]