Sign inSign up

dieisraels/bitbucket-git-ftp

By dieisraels

Updated over 5 years ago

Image for Bitbucket Pipelines with git-ftp and sftp support.

Image
0

4.1K

dieisraels/bitbucket-git-ftp repository overview

git ftp needs the key as absolute path. In addition, the public key cannot be generated automatically by git ftp and must be created in advance. In the example, the default pipeline key is extracted from the config file.

Bitbucket Pipeline example:

branches:
  master:
    - step:
        name: Deployment
        image: dieisraels/bitbucket-git-ftp:latest
        script:
          - curl -V
          - git-ftp --version
          - KEY_PATH=`cat ~/.ssh/config | grep '^IdentityFile' | sed -e 's/^IdentityFile //g'`
          - (umask  077 ; cp $KEY_PATH ~/.ssh/id_rsa)
          - ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub
          - git ftp push -u "user" --key "$HOME/.ssh/id_rsa" "sftp://example.com/~/httpdocs/"

More information: https://github.com/git-ftp/git-ftp/blob/master/man/git-ftp.1.md

Tag summary

Content type

Image

Digest

Size

382.1 MB

Last updated

over 5 years ago

docker pull dieisraels/bitbucket-git-ftp