Commit 3e0fe506 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 aca5495b
...@@ -175,11 +175,15 @@ module ProjectsHelper ...@@ -175,11 +175,15 @@ module ProjectsHelper
def default_url_to_repo(project = nil) def default_url_to_repo(project = nil)
project = project || @project project = project || @project
current_user ? project.url_to_repo : project.http_url_to_repo #current_user ? project.url_to_repo : project.http_url_to_repo
# always HTTP:
project.http_url_to_repo
end end
def default_clone_protocol def default_clone_protocol
current_user ? "ssh" : "http" #current_user ? "ssh" : "http"
# always HTTP:
"http"
end end
def project_last_activity(project) def project_last_activity(project)
......
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