Feature #2583: Disable HTTP cloning (#3667)

* Can disable GIT interactions by HTTP protocol

* rename variable + fix wiki link

* missing space
This commit is contained in:
Thibault Meyer
2016-12-22 07:42:04 +01:00
committed by 无闻
parent d04b19545d
commit c47fbc629b
7 changed files with 40 additions and 12 deletions

View File

@@ -118,6 +118,7 @@ var (
MirrorQueueLength int
PullRequestQueueLength int
PreferredLicenses []string
DisableHTTPGit bool
// Repository editor settings
Editor struct {
@@ -494,6 +495,7 @@ func NewContext() {
// Determine and create root git repository path.
sec = Cfg.Section("repository")
Repository.DisableHTTPGit = sec.Key("DISABLE_HTTP_GIT").MustBool()
RepoRootPath = sec.Key("ROOT").MustString(path.Join(homeDir, "gogs-repositories"))
forcePathSeparator(RepoRootPath)
if !filepath.IsAbs(RepoRootPath) {