I'm currently building a Pipeline to deploy my PHP Symfony Project from Dev Ops Repo to my Server. I use a SSH Task to execute the commands on the Server. The SSH Connection works fine, but some outputs of the executed commands are threaded as errors, like for git pull:
Starting: Run shell inline on remote machine
==============================================================================
Task : SSH
Description : Run shell commands or a script on a remote machine using SSH
Version : 0.177.0
Author : Microsoft Corporation
Help : https://learn.microsoft.com/azure/devops/pipelines/tasks/deploy/ssh
==============================================================================
Trying to establish an SSH connection to ***@xxx
Successfully connected.
chmod +x ./sshscript_32bf87de-91b8-45b5-bae1-02400a139bfc
./sshscript_32bf87de-91b8-45b5-bae1-02400a139bfc
##[error]From vs-ssh.visualstudio.com:v3/xxx
* branch master -> FETCH_HEAD
Already up-to-date.
##[error]Command failed with errors on remote machine.
Finishing: Run shell inline on remote machine
This is my Configuration:
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
steps:
- task: SSH@0
displayName: 'Clean and Pull Git'
continueOnError: false
inputs:
sshEndpoint: 'xxx'
runOptions: inline
inline: |-
cd xxx
git clean -xdf
git pull origin master
How can I solve this Issue? (e.g. composer install has the same problem)
I know I could redirect stdout, but I want to keep the Output Messages