I'm facing some issues. We're using siteground as a hosting provider and they have an option to create a git repository. The problem is that they provide a 'git clone ssh:' path to clone, that I cannot use on the import option of bitbucket.
So, my workaround was this (that not sure if is correct)
1. clone the created repo locally
2. Create repo on bitbucket
3. Copy all files into the bitbucket master (except .git folder)
The problem Im facing is that the repo looses the connection to the live site (due that im using bitbucket repo instead of the created in siteground) so, I can't pull to live site.
Ive tried to create a pipeline connecting through ftp, but it tales more than 120m so it gives error and doesnt deploy.
I'm doing anything wrong here, or how can I connect the master repo to pull into live site?
We have a staging enviroment using plesk, that is working. On plesk we have a git extension where we can copy the 'clone' path of bitbucket and select the branch. The problem is that siteground/sitetools doesn't have that option/extension
Hi @ITStacks and welcome to the community.
I'm not sure I understand which of the following two you are trying to achieve:
1. Do you want to keep in sync the Bitbucket repo, with the Git repo hosted by SiteGround?
2. Or do you want to be able to push the files from the Bitbucket repo to a remote server?
Allow me to say that I'm not really familiar with SiteGround, so I'm not sure what your set up is there.
You mentioned that you tried creating a Pipeline and use ftp but the deployment failed.
If you want to copy files to a remote server via Pipelines, we have certain pipes that you can use in your bitbucket-pipelines.yml file for that purpose.
For example, if it is possible to connect to the remote server via SSH, you can set up SSH keys in Bitbucket Pipelines for this repo, as per:
then you can use one of these pipes to deploy:
We also have a pipe for deploying via ftp, I'm not sure if you've been using this one, or if you're trying to deploy with git ftp commands?
Regarding the Pipelines build that fails, can you see in the log of this build whether the deployment of files starts, or if the connection to your remote server is closing/timing out?
Thank you for your reply, I've tested the rscync deploy and it worked well!
I need to exclude some files (like wp-config.php) from the whole workflow, I've tried using the pull request ignore/exlude but when I create and approve/merge the pull request, then the file is still updating with the changes
Is there a way to exclude files from the pipeline itself?
Hi @ITStacks ,
Good to hear that the rsync deploy worked well!
Regarding excluding files, the PR exclude files option won't work here, this feature is only for excluding files from the PR diff.
In order to exclude files from deploy with this pipe, you can use the EXTRA_ARGS variable of the pipe. One example we have in our docs is the following:
- pipe: atlassian/rsync-deploy:0.4.4
which excludes all files with .txt extension from deploy. If you want to exclude multiple, specific files, I believe you can replace the EXTRA_ARGS line with:
EXTRA_ARGS: '--exclude=file1.txt --exclude=file2.php'
If these files are not at the root of the repo, but inside a directory of the repo, make sure to specify the relative path to the file, instead of only its name.
Is this something that works for you?
Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events