feat: support username flag. (#45)

* feat: support username flag.
This commit is contained in:
Bo-Yi Wu
2017-02-21 11:44:37 +08:00
committed by GitHub
parent 7871a8e9f5
commit 833d26f473
5 changed files with 23 additions and 23 deletions
+3 -3
View File
@@ -36,9 +36,9 @@ func main() {
EnvVar: "PLUGIN_KEY_PATH,SSH_KEY_PATH",
},
cli.StringFlag{
Name: "user,u",
Name: "username,user,u",
Usage: "connect as user",
EnvVar: "PLUGIN_USER,SSH_USER",
EnvVar: "PLUGIN_USERNAME,PLUGIN_USER,SSH_USERNAME",
Value: "root",
},
cli.StringFlag{
@@ -118,7 +118,7 @@ func run(c *cli.Context) error {
Config: Config{
Key: c.String("ssh-key"),
KeyPath: c.String("key-path"),
User: c.String("user"),
UserName: c.String("user"),
Password: c.String("password"),
Host: c.StringSlice("host"),
Port: c.Int("port"),