Automatically migrated from Gitolite
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

17 lines
450 B

#!/usr/bin/env coffee
scrypt = require "scrypt-for-humans"
Promise = require "bluebird"
read = Promise.promisify(require "read")
Promise.try ->
read(prompt: "Enter a password:", silent: true)
.spread (password, isDefault) ->
if password.trim().length == 0
console.log "You didn't enter a password!"
process.exit(1)
scrypt.hash(password)
.then (hash) ->
console.log "Hash:", hash
console.log "Set this hash in your config.json to use it."