deployer
deployer copied to clipboard
Empty response from command: $git config --get remote.origin.url
https://github.com/deployphp/deployer/blob/8e4366bb42f10421ea0aacc93f7bab59cf29d6ed/recipe/deploy/update_code.php#L95
I must add '-f config' to get correct result.
$git config -f config --get remote.origin.url
Upvote & Fund
- We're using Polar.sh so you can upvote and help fund this issue.
- We receive the funding once the issue is completed & confirmed by you.
- Thank you in advance for helping prioritize & fund our backlog.
I also have problems because of remote.origin.url
.
Task deploy:update_code
generates infinite loop.
Probably it's because I don't have at all remote
named origin
in my repositories.
So I just commented this block, then task works fine:
https://github.com/deployphp/deployer/blob/8e4366bb42f10421ea0aacc93f7bab59cf29d6ed/recipe/deploy/update_code.php#L94-L99
I also have problems because of
remote.origin.url
.Task
deploy:update_code
generates infinite loop.Probably it's because I don't have at all
remote
namedorigin
in my repositories.So I just commented this block, then task works fine:
https://github.com/deployphp/deployer/blob/8e4366bb42f10421ea0aacc93f7bab59cf29d6ed/recipe/deploy/update_code.php#L94-L99
Hello @sviriden where did you comment on this code? I am using laravel and I have commented out this code in vendor/deployer/deployer/recipe/deploy/update_code.php
but it did not take effect because the deployer is still running the same command .. any suggestions on this?
@Base29, my solutions was:
Create new file deployer_update_code_custom.php
and copy there all code from mentioned file vendor/deployer/deployer/recipe/deploy/update_code.php
. Inside of this file comment rows 94-99.
Then in my deploy.yaml:
import:
- deployer_update_code_custom.php
...
tasks:
build:
- cd: '{{release_path}}'
- run: 'npm run build'
deploy:
- deploy:info
- deploy:setup
- deploy:lock
- deploy:release
- deploy:update_code_custom
- deploy:shared
- deploy:writable
- deploy:vendors
- artisan:storage:link
- artisan:view:cache
- artisan:config:cache
- artisan:migrate
- deploy:publish
Probably you should adjust deploy-tasks for your project.
Btw, I also use Laravel. Maybe this bug is Laravel-specific.
Had the same issue, but the problem was actually a permissions issue on the server. The .dep folder in particular has to be owned by the user that is triggering the deployment.
For us this was an encoding problem comparing the two string.
We fixed that by changing the comparison to mb_strstr:
if (mb_strstr(run("$git config --get remote.origin.url"), $repository) === false) {
cd('{{deploy_path}}');
run("rm -rf $bare");
goto start;
}
Had the same issue, but the problem was actually a permissions issue on the server. The .dep folder in particular has to be owned by the user that is triggering the deployment.
After I changed the .dep folder to be owned by the user deployer
, it was successfully deployed. But, the .dep folder back to www-data user. How do you think I could solve it?
Try to understand who is making the .dep dir owned by www-data.
Try to understand who is making the .dep dir owned by www-data.
Okay, I figured out the problem. Thanks