Skip to content

How to store passwords some place other than in config.rb

Tom Vaughan edited this page Oct 8, 2013 · 1 revision

MacOS X users, also see https://github.com/tvaughan/middleman-deploy/issues/22#issuecomment-18701276

Add one of these methods to config.rb:

Method 1:

file = File.open("password", "r")
password = file.read
file.close

Method 2:

password = ENV["PASSWORD"]

plus this:

activate :deploy do |deploy|
  deploy.method = :ftp
  deploy.host = "ftp.example.mil"
  deploy.user = "tvaughan"
  deploy.password = password
  deploy.path = "/var/www"
end

For Method 1 run:

echo -n gr8passwd > password
middleman deploy

For Method 2 run:

PASSWORD=gr8passwd middleman deploy