I'm using SCP-Deploy with OpenSSH on Windows Server. Everything worked fine for the first few runs. Suddenly I started getting Broken Pipe issue and scp proces freezes. The pipeline doesn't stop, looks like it's still going, no error is shown, but nothing happens and I have to stop it manually as it never progresses:
scp: E:/Sites/MYAPI/Microsoft.AspNetCore.Identity.EntityFrameworkCore.dll: Broken pipe
This happened intermittently, now happens pretty much every time I run the pipe. Tried setting ServerAliveInterval etc, but this doesn't help the issue. Any idea why this could be the case? SCP is my only option, apart from slow SFTP to move files to Windows Server from Bitbucket Pipelines hence any help would be greatly appreciated. Files I'm moving are not huge, it's a 200mb in total of .NET API where no one file is extremely large. The Broken Pipe issue shows up pretty much at the beginning of the transfer.
SCP yml section:
- pipe: atlassian/scp-deploy:1.2.1
variables:
USER: $WEB2_USER
SERVER: $WEB2_SERVER
SSH_PORT: '22'
REMOTE_PATH: $WEB2_PATH/Services
LOCAL_PATH: /opt/atlassian/pipelines/agent/build/deploy/Services/*
EXTRA_ARGS: ['-o', 'ServerAliveInterval=60', '-o', 'ServerAliveCountMax=10']
DEBUG: 'true'
There is no difference when I remove EXTRA_ARGS