Coder Social home page Coder Social logo

git2sftp's Introduction

git2sftp

CLI tool for deploying code from a Git repository via SFTP in a controlled way

Prerequisites

  • Git

How to use it

You can simply download it from here and run it, the tool will guide you through the process.

> git2sftp [options]

Rollback

You can also easily rollback a change to its previous state using the rollback command.

> git2sftp rollback [options]

Environmental Variables

The environmental variables set the default answers. They can be set using a .env file.

# Defaults

WORKSPACE=
SFTP_USER=
SFTP_PASSWORD=
SFTP_HOSTNAME=
SFTP_PORT=22
SFTP_DEST=/app
GIT_REPOSITORY=
BRANCH=master
ENCRYPTION_KEY=git-to-sftp-big-secret
ENCRYPTION_ALGORITHM=aes-256-cbc
ENCRYPTION_IV_LENGTH=16
ENCRYPTION_PREFIX=Git2SFTP Rules!

Options

Some of the options to preset the settings. If they are set the question will be skipped.

-w, --workspace     Select Workspace
-h, --hostname      SFTP Hostname
-u, --user          SFTP User
-p, --password      SFTP Password
--port              SFTP Port (Default: 22)
-d, --dest          SFTP Remote Destiny
-r, --repository    Git repository
-b, --branch        Git branch (Default: master)
-h                  Show Help
-v                  Show Version

Development

Simply clone the repository and run yarn start to run the app.

> git clone https://github.com/thankyou-payroll/git2sftp.git
> cd git2sftp
> yarn
> yarn start

Build

To generate a release using nexe just:

> yarn build

Encrypted Credentials

To keep your credentials safe you can specify your personal ENCRYPTION_KEY and ENCRYPTION_PREFIX when running the command

> ENCRYPTION_KEY="๐Ÿ”‘๐Ÿ—๏ธ" ENCRYPTION_PREFIX="๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ" git2sftp [options]

The file .creds will be created the first time you save a credentials.

git2sftp's People

Contributors

thram avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

yupheria

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.