I'm looking for a part-time remote job.

Hire me


I'm the author of:

Mastering Redmine is a comprehensive guide with tips, tricks and best practices, and an easy-to-learn structure.

Check the book's project or

Buy the book

Social pages of the book:

By buying this book you also donate to Redmine (see this page).


Follow me:

authorize_ssh_protocol_in_git_url.patch

Jean-Sébastien Bour, 30 May 2011 13:28

Download (744 Bytes)

View differences:

lib/scm_repositories_helper_patch.rb (copie de travail)
71 71
                matches = Regexp.new("^#{Regexp.escape(path)}/([^/]+)/?$").match(@project.repository.url)
72 72
                if matches
73 73
                    url = ''
74
                    if gitconf['url'] =~ %r{^(?:https?|git)://}
74
                    if gitconf['url'] =~ %r{^(?:https?|git|ssh)://}
75 75
                        url = "#{gitconf['url']}/#{matches[1]}"
76 76
                    else
77 77
                        url = "#{Setting.protocol}://#{Setting.host_name}/#{gitconf['url']}/#{matches[1]}"
Terms of use | Privacy policy