| Q | A
| ----------------- | ---
| Issue Type | Question
| Deployer Version | 6.3.0
| Local Machine OS | Gitlab CI/docker
| Remote Machine OS | Ubuntu 18
I'm getting an error when deploying with GitlabCI:
➤ Executing task deploy:prepare
✔ Ok
➤ Executing task deploy:lock
✔ Ok
➤ Executing task deploy:release
✔ Ok
➤ Executing task deploy:update_code
➤ Executing task deploy:failed
✔ Ok
➤ Executing task deploy:unlock
✔ Ok
In Process.php line 1042:
TTY mode requires /dev/tty to be read/writable.
deploy [-p|--parallel] [-l|--limit LIMIT] [--no-hooks] [--log LOG] [--roles ROLES] [--hosts HOSTS] [-o|--option OPTION] [--] [<stage>]
ERROR: Job failed: exit code 1
this is my gitlab-ci.yml file:
.deploy: &deploy_definition
stage: deploy
image: w0rddriven/docker-laravel-deployer
before_script:
- eval $(ssh-agent -s)
- mkdir -p ~/.ssh
- echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- chmod 600 ~/.ssh/id_rsa
script:
deploy:develop:
<<: *deploy_definition
script:
- dep deploy develop
only:
- develop
How to fix this?
I tried to fix it: https://github.com/sweebee/deployer/commit/868e2b5019e51830f53cc4c9d4d364dddf2acff1
But now i have a different problem:
In Process.php line 239:
[Symfony\Component\Process\Exception\ProcessFailedException]
The command "ssh -A -tt [email protected] 'cd /home/
username/hostname.com && (/usr/bin/git clone -b develop --recursi
ve -q git@gitlabrepo /hom
e/username/hostname.com/releases/7 2>&1)'" failed.
Exit Code: 128(Invalid exit argument)
Working directory: /builds/app
Output:
================
fatal: destination path '/home/username/hostname.com/releases/7'
already exists and is not an empty directory.
it works when i set set('git_tty', false);
Confirmed, set('git_tty', false); works like a charm(ander). 🔥
Most helpful comment
it works when i set set('git_tty', false);