gitlab只使用https协议
主要修改两个地方
1 修改app/views/shared/_clone_panel.html.haml
删掉下面这段代码1
2
3
4
5
6
7%button{ |
class: "btn #{ 'active' if default_clone_protocol == 'ssh' }#{ ' has_tooltip' if current_user && current_user.require_ssh_key? }", |
:"data-clone" => project.ssh_url_to_repo, |
:"data-title" => "Add an SSH key to your profile<br> to pull or push via SSH",
:"data-html" => "true",
:"data-container" => "body"}
SSH
2 修改./app/helpers/projects_helper.rb
1 | def default_url_to_repo(project = nil) |