diff options
author | rune <runner.mei@gmail.com> | 2023-05-12 17:44:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-12 09:44:37 +0000 |
commit | 4b808133414e39348f56d691883426947bf2d322 (patch) | |
tree | ce7dc40af8630e9e9db07f500dd56e032cdc00ba /modules/setting | |
parent | 49808136c5af5946851c5486d4630482d79eff8b (diff) | |
download | gitea-4b808133414e39348f56d691883426947bf2d322.tar.gz gitea-4b808133414e39348f56d691883426947bf2d322.zip |
Support SSH for go get (#24664)
fix #12192 Support SSH for go get
---------
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: mfk <mfk@hengwei.com.cn>
Co-authored-by: silverwind <me@silverwind.io>
Diffstat (limited to 'modules/setting')
-rw-r--r-- | modules/setting/repository.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/setting/repository.go b/modules/setting/repository.go index 56e7e6f4ac..153307a0b6 100644 --- a/modules/setting/repository.go +++ b/modules/setting/repository.go @@ -36,6 +36,7 @@ var ( DisableHTTPGit bool AccessControlAllowOrigin string UseCompatSSHURI bool + GoGetCloneURLProtocol string DefaultCloseIssuesViaCommitsInAnyBranch bool EnablePushCreateUser bool EnablePushCreateOrg bool @@ -273,6 +274,7 @@ func loadRepositoryFrom(rootCfg ConfigProvider) { sec := rootCfg.Section("repository") Repository.DisableHTTPGit = sec.Key("DISABLE_HTTP_GIT").MustBool() Repository.UseCompatSSHURI = sec.Key("USE_COMPAT_SSH_URI").MustBool() + Repository.GoGetCloneURLProtocol = sec.Key("GO_GET_CLONE_URL_PROTOCOL").MustString("https") Repository.MaxCreationLimit = sec.Key("MAX_CREATION_LIMIT").MustInt(-1) Repository.DefaultBranch = sec.Key("DEFAULT_BRANCH").MustString(Repository.DefaultBranch) RepoRootPath = sec.Key("ROOT").MustString(path.Join(AppDataPath, "gitea-repositories")) |