Permalink
Browse files

Revert "Adding support for non-default key location and passphrase-le…

…ss keys."

This reverts commit 984cb6b.

Didn't mean for this to go in the same branch/pull-request
  • Loading branch information...
1 parent 984cb6b commit 95a655b11de14898f7cc5c98b6e0435643521839 @philwills philwills committed Apr 26, 2012
Showing with 4 additions and 17 deletions.
  1. +4 −17 magenta-cli/src/main/scala/magenta/cli/Main.scala
@@ -14,9 +14,7 @@ object Main extends scala.App {
object Config {
var project: Option[String] = None
-
var build: Option[String] = None
-
var host: Option[String] = None
var stage = ""
var recipe = "default"
@@ -25,8 +23,6 @@ object Main extends scala.App {
var ec2Hosts = false
var jvmSsh = false
- var keyLocation: Option[String] = None
- var noPassphrase = false
private var _di = "/opt/bin/deployinfo.json"
@@ -90,15 +86,8 @@ object Main extends scala.App {
{ dir => Config.localArtifactDir = Some(new File(dir)) })
opt("deployinfo", "use a different deployinfo script", { deployinfo => Config.deployInfo = deployinfo })
opt("ec2-hosts", "Retrieve host list from EC2", { Config.ec2Hosts = true})
- opt("path", "Path for deploy support scripts (default: '/opt/deploy/bin')",
- { path => CommandLocator.rootPath = path })
-
- opt("j", "jvm-ssh", "perform ssh within the JVM, rather than shelling out to do so",
- { Config.jvmSsh = true })
- opt("k", "key-location", "location of SSH key used for authentication. Only works with JVM based SSH",
- { location => Config.keyLocation = Some(location)})
- opt("no-passphrase", "use a passphrase-less SSH key. Only works with JVM based SSH",
- {Config.noPassphrase = true})
+ opt("path", "Path for deploy support scripts (default: '/opt/deploy/bin')", { path => CommandLocator.rootPath = path })
+ opt("j", "jvm-ssh", "perform ssh within the JVM, rather than shelling out to do so", { Config.jvmSsh = true })
separator("\n")
@@ -109,10 +98,8 @@ object Main extends scala.App {
}
lazy val sshCredentials: Option[PublicKeyLogin] = if (Config.jvmSsh) {
- val passphrase = if (Config.noPassphrase) None else Some(System.console.readPassword("Please enter your passphrase:"))
- Some(PublicKeyLogin(System.getenv("USER"),
- passphrase map { phrase => SimplePasswordProducer(phrase.toString) },
- Config.keyLocation.map(List(_)).getOrElse(DefaultKeyLocations)))
+ val passphrase = System.console.readPassword("Please enter your passphrase:")
+ Some(PublicKeyLogin(System.getenv("USER"), SimplePasswordProducer(passphrase.toString), DefaultKeyLocations))
} else None
Log.current.withValue(CommandLineOutput) {

0 comments on commit 95a655b

Please sign in to comment.