从bitbucket存储库推送到共享主机ftp服务器 [英] push from bitbucket repository to shared hosting ftp server
问题描述
我使用Bitbucket管理我的私人存储库。
我希望将每次提交时更新的文件部署到ftp服务器。
我google出来了,发现了很多脚本,但没有成功。
ftp服务器是一个共享托管服务器,可通过FTP显式连接模式访问Filezilla。
我不想使用任何第三方在线应用程序。
请指导我走到解决方案。
我正尝试使用 this
但是必须在Bitbucket帐户的部署密钥中输入哪个密钥? Private or Public?
您可以使用新的bitbucket工具Pipelines!配置一个新的管道文件:
image:samueldebruyn / debian-git
pipeline:
default:
- step:
脚本:
- apt-get更新
- apt-get -qq install git-ftp
- git ftp init --user $ FTP_USERNAME - passwd $ FTP_PASSWORD ftp:// server / public_html /
提交之前,创建环境变量$ FTP_USERNAME并在设置 - >环境变量中设置$ FTP_PASSWORD。
对于推送编辑源代码并将init更改为push并承诺替换共享服务器上的文件。
有关更多信息,请观看此视频:
https:// www.youtube.com/watch?v=8HZhHtZebdw
I am using Bitbucket for managing my private repositories.
I wish to deploy the files that are being updated on every commit to the ftp server.
I google'd out and found many scripts, but couldn't succeeded with any of them. The ftp server is an shared hosting server which is accessed by Filezilla in FTP explicit connection mode.
I don't want to use any third party online applications.
Please guide me a walk through to the solution.
I am trying to use this
But which key must be entered in the deployment key of Bitbucket account? Private or Public?
You can use the new bitbucket tool, Pipelines! Configure a new pipeline file:
image: samueldebruyn/debian-git
pipelines:
default:
- step:
script:
- apt-get update
- apt-get -qq install git-ftp
- git ftp init --user $FTP_USERNAME --passwd $FTP_PASSWORD ftp://server/public_html/
Before you commit, create the environment variables $ FTP_USERNAME and $ FTP_PASSWORD in settings -> environment variables.
For the push edit the source code and change the "init" to "push" and commit to replace the file on your shared server.
For more information watch this video: https://www.youtube.com/watch?v=8HZhHtZebdw
这篇关于从bitbucket存储库推送到共享主机ftp服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!