diff options
author | Unknwon <joe2010xtmf@163.com> | 2015-02-13 00:58:46 -0500 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2015-02-13 00:58:46 -0500 |
commit | 6d0f3a07d4fa3189b0b7c4e366bddb6d72ef7e68 (patch) | |
tree | 02b1617a75095fe5f072533708e920fbac477d34 /cmd/serve.go | |
parent | b99c4baab22ec080906582703809e5ec12bae3f9 (diff) | |
download | gitea-6d0f3a07d4fa3189b0b7c4e366bddb6d72ef7e68.tar.gz gitea-6d0f3a07d4fa3189b0b7c4e366bddb6d72ef7e68.zip |
code fix #941 caution: undertest
Diffstat (limited to 'cmd/serve.go')
-rw-r--r-- | cmd/serve.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cmd/serve.go b/cmd/serve.go index 54b3714806..e8e5c186c7 100644 --- a/cmd/serve.go +++ b/cmd/serve.go @@ -83,16 +83,16 @@ func In(b string, sl map[string]models.AccessMode) bool { return e } -func runServ(k *cli.Context) { - if k.IsSet("config") { - setting.CustomConf = k.String("config") +func runServ(c *cli.Context) { + if c.IsSet("config") { + setting.CustomConf = c.String("config") } setup("serv.log") - if len(k.Args()) < 1 { + if len(c.Args()) < 1 { log.GitLogger.Fatal(2, "Not enough arguments") } - keys := strings.Split(k.Args()[0], "-") + keys := strings.Split(c.Args()[0], "-") if len(keys) != 2 { println("Gogs: auth file format error") log.GitLogger.Fatal(2, "Invalid auth file format: %s", os.Args[2]) @@ -116,6 +116,7 @@ func runServ(k *cli.Context) { cmd := os.Getenv("SSH_ORIGINAL_COMMAND") if cmd == "" { println("Hi", user.Name, "! You've successfully authenticated, but Gogs does not provide shell access.") + println("If this is what you do not expect, please log in with password and setup Gogs under another user.") return } |