首页 > 解决方案 > 如何使用 sftp 和密钥从 bitbucket 管道部署?

问题描述

我正在尝试使用 BitBucket Pipelines 使用git-ftpand推送到远程服务器sftp。我正在使用亚马逊 Linux 2

这是我的 bitbucket-pipelines.yml;

image: madshansen/docker-git-ftp:latest

pipelines:
  default:
    - step:
        script:
          - apt-get update
          - apt-get -qq install git-ftp
          - git ftp push --user $FTP_USERNAME "sftp://servername.domain.com/var/www/html/dev.videommerce.com/"

不幸的是,我收到以下错误

fatal: Remote host not set.

注意:我根据文档添加了键和所有变量。

我的代码有什么问题?

标签: continuous-integrationbitbucketsftpcontinuous-deploymentbitbucket-pipelines

解决方案


推荐阅读