diff --git a/app/helpers/repositories_helper.rb b/app/helpers/repositories_helper.rb index 6ffa77cc4..a855dfdf1 100644 --- a/app/helpers/repositories_helper.rb +++ b/app/helpers/repositories_helper.rb @@ -324,9 +324,9 @@ module RepositoriesHelper def repo_git_submodule_url(owner, repo, path) unless (path.starts_with?('http://') || path.starts_with?('https://')) if path.starts_with?('git@code.gitlink.org.cn') - path = path.gsub("git@code.gitlink.org.cn","https://gitlink.org.cn").gsub(":","/") + path = path.gsub(":","/").gsub("git@code.gitlink.org.cn","https://gitlink.org.cn") elsif path.starts_with?('git@code.gitlink.org.cn') - path = path.gsub("git@","https://").gsub(":","/") + path = path.gsub(":","/").gsub("git@","https://") else path = File.expand_path(path, "/#{owner&.login}/#{repo&.identifier}") end