aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/serv.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2018-12-12 02:37:32 +0800
committertechknowlogick <hello@techknowlogick.com>2018-12-11 13:37:32 -0500
commitba75319157f23031cfca55b5a286f86d36065f35 (patch)
tree450a6e1ffd17b89fd00fea664c59cb31f7cbc351 /cmd/serv.go
parentccea91652f8d23bd65494f5c04275506118aaa27 (diff)
downloadgitea-ba75319157f23031cfca55b5a286f86d36065f35.tar.gz
gitea-ba75319157f23031cfca55b5a286f86d36065f35.zip
fix clone wiki failed via ssh (#5503)
Diffstat (limited to 'cmd/serv.go')
-rw-r--r--cmd/serv.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/cmd/serv.go b/cmd/serv.go
index 51b0b4984b..c98228745d 100644
--- a/cmd/serv.go
+++ b/cmd/serv.go
@@ -144,11 +144,15 @@ func runServ(c *cli.Context) error {
}()
}
- isWiki := false
- unitType := models.UnitTypeCode
+ var (
+ isWiki bool
+ unitType = models.UnitTypeCode
+ unitName = "code"
+ )
if strings.HasSuffix(reponame, ".wiki") {
isWiki = true
unitType = models.UnitTypeWiki
+ unitName = "wiki"
reponame = reponame[:len(reponame)-5]
}
@@ -245,7 +249,7 @@ func runServ(c *cli.Context) error {
clientMessage = "You do not have sufficient authorization for this action"
}
fail(clientMessage,
- "User %s does not have level %v access to repository %s",
+ "User %s does not have level %v access to repository %s's "+unitName,
user.Name, requestedMode, repoPath)
}
@@ -304,7 +308,7 @@ func runServ(c *cli.Context) error {
gitcmd = exec.Command(verb, repoPath)
}
if isWiki {
- if err = repo.InitWiki(); err != nil {
+ if err = private.InitWiki(repo.ID); err != nil {
fail("Internal error", "Failed to init wiki repo: %v", err)
}
}