From 4f9ca89668c7e6e3fc42b5f7fa3601eeb1b13530 Mon Sep 17 00:00:00 2001 From: Kirill Smelkov <kirr@nexedi.com> Date: Sun, 15 Nov 2015 15:13:18 +0300 Subject: [PATCH] NXD Make HTTP to be the default clone protocol Both fetch and push are possible over https, which is selected by http if gitlab was configured to use https in external url. This way to reduce security vectors and possible ways to interact with gitlab we use https only without ssh at all. --- app/helpers/projects_helper.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 77ba612548..d74d124552 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -183,7 +183,8 @@ module ProjectsHelper end def default_url_to_repo(project = @project) - if default_clone_protocol == "ssh" + # always HTTP: + if false # default_clone_protocol == "ssh" project.ssh_url_to_repo else project.http_url_to_repo @@ -191,7 +192,8 @@ module ProjectsHelper end def default_clone_protocol - if !current_user || current_user.require_ssh_key? + # always HTTP: + if true # !current_user || current_user.require_ssh_key? "http" else "ssh" -- GitLab