Commit 4f9ca896 authored by Kirill Smelkov's avatar Kirill Smelkov

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.
parent 7ae81a0d
...@@ -183,7 +183,8 @@ module ProjectsHelper ...@@ -183,7 +183,8 @@ module ProjectsHelper
end end
def default_url_to_repo(project = @project) 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 project.ssh_url_to_repo
else else
project.http_url_to_repo project.http_url_to_repo
...@@ -191,7 +192,8 @@ module ProjectsHelper ...@@ -191,7 +192,8 @@ module ProjectsHelper
end end
def default_clone_protocol def default_clone_protocol
if !current_user || current_user.require_ssh_key? # always HTTP:
if true # !current_user || current_user.require_ssh_key?
"http" "http"
else else
"ssh" "ssh"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment