diff options
author | Chris Wilson <chris@chrisjwilson.com> | 2017-04-14 04:53:30 +0300 |
---|---|---|
committer | Chris Wilson <chris@chrisjwilson.com> | 2017-04-27 03:51:35 +0300 |
commit | 0f1273fa44a9122bffbd5cecbaea99b1db781d7e (patch) | |
tree | 1cb3a5dfdb669ff2f5eda3181f91e4ecf127d9dc /config | |
parent | 5173baa0046b6656dcbb52bf5447a0de3749fd6a (diff) |
Add configurable timeout for git fetch and clone operations
GitLab uses the import_project method in GitLab Shell,
This method uses a timeout for the operation, hardcoded to 800 seconds.
With this MR the timeout is now configurable in the gitlab_shell
settings.
Diffstat (limited to 'config')
-rw-r--r-- | config/gitlab.yml.example | 3 | ||||
-rw-r--r-- | config/initializers/1_settings.rb | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example index 06c9f734c2a..ce477001b6f 100644 --- a/config/gitlab.yml.example +++ b/config/gitlab.yml.example @@ -502,6 +502,9 @@ production: &base upload_pack: true receive_pack: true + # Git import/fetch timeout + # git_timeout: 800 + # If you use non-standard ssh port you need to specify it # ssh_port: 22 diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index 87bf48a3dcd..16bc08cf48f 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -386,6 +386,7 @@ Settings.gitlab_shell['ssh_port'] ||= 22 Settings.gitlab_shell['ssh_user'] ||= Settings.gitlab.user Settings.gitlab_shell['owner_group'] ||= Settings.gitlab.user Settings.gitlab_shell['ssh_path_prefix'] ||= Settings.__send__(:build_gitlab_shell_ssh_path_prefix) +Settings.gitlab_shell['git_timeout'] ||= 800 # # Repositories |