We have repo in bitbucket cloud. whenever commit happens we need automatically push codes into our file location. we have multiple local windows machine. i tried the FTP method and SSH both need public IP but we need each server to get a public IP thats a long process. is there any method to create a pipeline to automatically push codes into local private windows machine. previosly i tried this code
script:
- pipe: atlassian/ftp-deploy:0.3.7
variables:
USER: $FTP_USERNAME
PASSWORD: $FTP_PASSWORD
SERVER: 172.27.140.71
REMOTE_PATH: /tmp/my-remote-directory
LOCAL_PATH: /,
EXTRA_ARGS: "--exclude=filename_to_exclude.txt --exclude=folder_to_exclude/"
its not woeking so i tried openSSH method
image: node:14
pipelines:
default:
- step:
name: Deploy to Windows Server
script:
- apt-get update && apt-get install -y openssh-client
- ssh -T $USERNAME@$HOST
cd C:\databottest
git clone git@bitbucket.org:<redacted>/<redacted>.git .
git checkout master
git pull origin master
this is also not working i added known host and open 22 port also, please suggest me best way to communicate cloud to local network.