Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bitbucket cloud repo automatically push codes into our local private windows machine when commit.

Naveenkumar M
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 5, 2023

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

- pipe: atlassian/ftp-deploy:0.3.7
REMOTE_PATH: /tmp/my-remote-directory
EXTRA_ARGS: "--exclude=filename_to_exclude.txt --exclude=folder_to_exclude/"

its not woeking so i tried openSSH method

image: node:14

- step:
name: Deploy to Windows Server
- apt-get update && apt-get install -y openssh-client
cd C:\databottest
git clone<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.

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 7, 2023

Hello @Naveenkumar M ,

Thank you for reaching out to Atlassian Community!

When executing your pipeline using Atlassian infrastructure (cloud runners), your builds will run in a cloud environment and to access external resources, such as your windows servers, these servers will need to have a public IP address so they are reachable from the internet.

In order to access servers in your local network you have the option to use self-hosted runners, so the build will run in your own infrastructure and have access to the servers within your local network.

Another option would be to implement a script/job in each of the servers that keep pulling (git pull) the repository from bitbucket every X minutes, so you would get the latest update from the repo every time the job runs.

Hope that helps to address your questions! 

Thank you, @Naveenkumar M 

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events