New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Git Error During Deployment #3804
Comments
Good morning! What happens if you remove git_ssh_command? i would assume, that either there are weird whitespaces or the server has a broken configuration? you can copy the commands submitted and run them individually. That helps me often to identify issues. |
Good morning, @Schrank I have removed the following line: set('git_ssh_command', 'ssh'); However, the same error still pops up as before. How can I go about copying the commands individually and running them so I can provide you with more info? I should also note, that everything works just fine on my Deployer 6 sites. Only version 7 is having this issue. |
Adding -vv shows you the commands, then you can copy them. |
Thanks @Schrank ! Here is the terminal output. ➜ dep7 deploy staging -vv
task deploy:info
[staging] info deploying main
done on staging
done deploy:info 92ms
task deploy:setup
[staging] run [ -d /var/www/deployer-7-testing ] || mkdir -p /var/www/deployer-7-testing;
cd /var/www/deployer-7-testing;
[ -d .dep ] || mkdir .dep;
[ -d releases ] || mkdir releases;
[ -d shared ] || mkdir shared;
[staging]
[staging] run if [ ! -L /var/www/deployer-7-testing/current ] && [ -d /var/www/deployer-7-testing/current ]; then echo +correct; fi
[staging]
done on staging
done deploy:setup 1s 243ms
task deploy:lock
[localhost] run git config --get user.name
[localhost] thinkcube-solutions
[staging] run [ -f /var/www/deployer-7-testing/.dep/deploy.lock ] && echo +locked || echo 'thinkcube-solutions' > /var/www/deployer-7-testing/.dep/deploy.lock
[staging]
[staging] +locked
done on staging
done deploy:lock 698ms
task deploy:release
[staging] run cd /var/www/deployer-7-testing && (if [ -h release ]; then echo +legitimate; fi)
[staging]
[staging] +legitimate
[staging] run cd /var/www/deployer-7-testing && (if [ -d releases ] && [ "$(ls -A releases)" ]; then echo +legitimate; fi)
[staging]
[staging] +legitimate
[staging] run cd /var/www/deployer-7-testing && (cat .dep/latest_release || echo 0)
[staging]
[staging] 1
[staging] run cd /var/www/deployer-7-testing && (if [ -d releases/1 ]; then echo +right; fi)
[staging]
[staging] +right
[staging] run cd /var/www/deployer-7-testing && (echo 1 > .dep/latest_release)
[staging]
[staging] run cd /var/www/deployer-7-testing && (echo '{"created_at":"2024-04-09T11:28:59+0000","release_name":"1","user":"thinkcube-solutions","target":"main"}' >> .dep/releases_log)
[staging]
[staging] run cd /var/www/deployer-7-testing && (mkdir -p releases/1)
[staging]
[staging] run cd /var/www/deployer-7-testing && ((man ln 2>&1 || ln -h 2>&1 || ln --help 2>&1) | grep -- --relative || true)
[staging]
[staging] -r, --relative
[staging] run cd /var/www/deployer-7-testing && (ln -nfs --relative releases/1 /var/www/deployer-7-testing/release)
[staging]
done on staging
done deploy:release 5s 522ms
task deploy:update_code
[staging] run command -v 'git' || which 'git' || type -p 'git'
[staging]
[staging] /usr/bin/git
[staging] run [ -d /var/www/deployer-7-testing/.dep/repo ] || mkdir -p /var/www/deployer-7-testing/.dep/repo
[staging]
[staging] run export GIT_TERMINAL_PROMPT='0' GIT_SSH_COMMAND='ssh -o StrictHostKeyChecking=accept-new'; [ -f /var/www/deployer-7-testing/.dep/repo/HEAD ] || /usr/bin/git clone --mirror git@github.com:thinkcube-solutions/deployer-7-testing.git /var/www/deployer-7-testing/.dep/repo 2>&1
[staging]
[staging] bash: line 1: syntax error near unexpected token `$'B\E[m/usr/bin/git''
[staging] bash: line 1: `( export GIT_TERMINAL_PROMPT='0' GIT_SSH_COMMAND='ssh -o StrictHostKeyChecking=accept-new'; [ -f /var/www/deployer-7-testing/.dep/repo/HEAD ] || /usr/bin/git clone --mirror git@github.com:thinkcube-solutions/deployer-7-testing.git /var/www/deployer-7-testing/.dep/repo 2>&1 ); printf '' $?;'
[staging] error in update_code.php on line 90:
[staging] exit code -1 (Unknown error)
done deploy:update_code 2s 63ms
ERROR: Task deploy:update_code failed!
task deploy:failed
done on staging
done deploy:failed 91ms
|
When deploying a simple config based on the above, the following error occours when the update_code task is run by Deployer:
The text was updated successfully, but these errors were encountered: