From c47fbc629bec5b4c213ddff24e96c20ed8f4ca74 Mon Sep 17 00:00:00 2001 From: Thibault Meyer <0xbaadf00d@users.noreply.github.com> Date: Thu, 22 Dec 2016 07:42:04 +0100 Subject: Feature #2583: Disable HTTP cloning (#3667) * Can disable GIT interactions by HTTP protocol * rename variable + fix wiki link * missing space --- modules/setting/setting.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules/setting/setting.go') diff --git a/modules/setting/setting.go b/modules/setting/setting.go index e7202b01..ea76e6c4 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -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) { -- cgit v1.2.3