Skip to content
Snippets Groups Projects
Commit 200eeea2 authored by Jacob Vosmaer (GitLab)'s avatar Jacob Vosmaer (GitLab)
Browse files

Make the repository downloads path configurable

parent 0488e34b
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -4,6 +4,7 @@ v 6.8.0
- Make user search case-insensitive (Christopher Arnold)
- Remove omniauth-ldap nickname bug workaround
- Drop all tables before restoring a Postgres backup
- Make the repository downloads path configurable
 
v 6.7.2
- Fix upgrader script
Loading
Loading
Loading
Loading
@@ -14,7 +14,7 @@ class Projects::RepositoriesController < Projects::ApplicationController
render_404 and return
end
 
storage_path = Rails.root.join("tmp", "repositories")
storage_path = Gitlab.config.gitlab.repository_downloads_path
 
file_path = @repository.archive_repo(params[:ref], storage_path, params[:format].downcase)
 
Loading
Loading
Loading
Loading
@@ -76,6 +76,10 @@ production: &base
snippets: false
visibility_level: "private" # can be "private" | "internal" | "public"
 
## Repository downloads directory
# When a user clicks e.g. 'Download zip' on a project, a temporary zip file is created in the following directory.
# repository_downloads_path: tmp/repositories
## External issues trackers
issues_tracker:
# redmine:
Loading
Loading
Loading
Loading
@@ -97,6 +97,7 @@ Settings.gitlab.default_projects_features['wiki'] = true if Settings.g
Settings.gitlab.default_projects_features['wall'] = false if Settings.gitlab.default_projects_features['wall'].nil?
Settings.gitlab.default_projects_features['snippets'] = false if Settings.gitlab.default_projects_features['snippets'].nil?
Settings.gitlab.default_projects_features['visibility_level'] = Settings.send(:verify_constant, Gitlab::VisibilityLevel, Settings.gitlab.default_projects_features['visibility_level'], Gitlab::VisibilityLevel::PRIVATE)
Settings.gitlab['repository_downloads_path'] = File.absolute_path(Settings.gitlab['repository_downloads_path'] || 'tmp/repositories', Rails.root)
 
#
# Gravatar
Loading
Loading
Loading
Loading
@@ -161,7 +161,7 @@ module API
repo = user_project.repository
ref = params[:sha]
format = params[:format]
storage_path = Rails.root.join("tmp", "repositories")
storage_path = Gitlab.config.gitlab.repository_downloads_path
 
file_path = repo.archive_repo(ref, storage_path, format)
if file_path && File.exists?(file_path)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment