From 71f124faa5634cdc45b7c170aa21061bc3532b70 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Sun, 10 Jan 2016 10:10:41 +0100 Subject: [PATCH 1/2] HTTPS links for submodules When cloning the repository with all its submodules, users without an SSH key registered will fail to clone submodules with an SSH link --- .gitmodules | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index 587ae6cd..e3dfa2a7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -676,7 +676,7 @@ url = https://github.com/CausalityLtd/sublime-pony [submodule "vendor/grammars/X10"] path = vendor/grammars/X10 - url = git@github.com:x10-lang/x10-highlighting.git + url = https://github.com/x10-lang/x10-highlighting [submodule "vendor/grammars/language-babel"] path = vendor/grammars/language-babel url = https://github.com/gandm/language-babel @@ -691,7 +691,7 @@ url = https://github.com/freemarker/FreeMarker.tmbundle [submodule "vendor/grammars/MagicPython"] path = vendor/grammars/MagicPython - url = git@github.com:MagicStack/MagicPython.git + url = https://github.com/MagicStack/MagicPython [submodule "vendor/grammars/language-click"] path = vendor/grammars/language-click url = https://github.com/stenverbois/language-click.git @@ -706,4 +706,4 @@ url = https://github.com/erkyrath/language-inform7 [submodule "vendor/grammars/atom-language-stan"] path = vendor/grammars/atom-language-stan - url = git@github.com:jrnold/atom-language-stan.git + url = https://github.com/jrnold/atom-language-stan From 52938f6dbf65d317c5074933319f2309e2557d99 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Sun, 17 Jan 2016 18:14:51 +0100 Subject: [PATCH 2/2] Test submodules are using HTTPS links --- test/test_grammars.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/test_grammars.rb b/test/test_grammars.rb index a2ad1e53..29211cc2 100644 --- a/test/test_grammars.rb +++ b/test/test_grammars.rb @@ -113,6 +113,20 @@ class TestGrammars < Minitest::Test assert_equal [], licensed, msg end + def test_submodules_use_https_links + File.open(".gitmodules", "r") do |fh| + ssh_submodules = [] + fh.each_line do |line| + if matches = line.match(/url = (git@.*)/) + submodule_link = matches.captures[0] + ssh_submodules.push(submodule_link) + end + end + msg = "The following submodules don't have an HTTPS link:\n* #{ssh_submodules.join("\n* ")}" + assert_equal [], ssh_submodules, msg + end + end + private def submodule_paths