8000 Change documentation git module link to https by linuxgemini · Pull Request #2461 · coreruleset/coreruleset · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Change documentation git module link to https #2461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 1, 2022

Conversation

linuxgemini
Copy link
Contributor

The PR #2260 got merged without counting anonymous git clones in; as ssh clones only work with an authenticated GitHub account.

This commit changes the git protocol of the documentation submodule from ssh to https.

The PR coreruleset#2260 got merged without counting anonymous git clones in; as ssh clones only work with an authenticated account.

This commit changes the git protocol of the documentation submodule from ssh to https.
@linuxgemini
Copy link
Contributor Author

Without this change:

root@new-server:/tmp# git clone --depth 1 https://github.com/coreruleset/coreruleset.git
Cloning into 'coreruleset'...
remote: Enumerating objects: 484, done.
remote: Counting objects: 100% (484/484), done.
remote: Compressing objects: 100% (439/439), done.
remote: Total 484 (delta 266), reused 109 (delta 26), pack-reused 0
Receiving objects: 100% (484/484), 442.88 KiB | 2.86 MiB/s, done.
Resolving deltas: 100% (266/266), done.
root@new-server:/tmp#

root@new-server:/tmp# cd coreruleset/
root@new-server:/tmp/coreruleset#

root@new-server:/tmp/coreruleset# git submodule init
Submodule 'docs/OWASP-CRS-Documentation' (git@github.com:coreruleset/documentation.git) registered for path 'docs/OWASP-CRS-Documentation'
Submodule 'util/regexp-assemble/lib/lib' (https://github.com/coreruleset/Regexp-Assemble.git) registered for path 'util/regexp-assemble/lib/lib'
root@new-server:/tmp/coreruleset#

root@new-server:/tmp/coreruleset# git submodule update --recursive
Cloning into '/tmp/coreruleset/docs/OWASP-CRS-Documentation'...
The authenticity of host 'github.com (140.82.121.4)' can't be established.
ECDSA key fingerprint is SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,140.82.121.4' (ECDSA) to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.com:coreruleset/documentation.git' into submodule path '/tmp/coreruleset/docs/OWASP-CRS-Documentation' failed
Failed to clone 'docs/OWASP-CRS-Documentation'. Retry scheduled
Cloning into '/tmp/coreruleset/util/regexp-assemble/lib/lib'...
Cloning into '/tmp/coreruleset/docs/OWASP-CRS-Documentation'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.com:coreruleset/documentation.git' into submodule path '/tmp/coreruleset/docs/OWASP-CRS-Documentation' failed
Failed to clone 'docs/OWASP-CRS-Documentation' a second time, aborting
root@new-server:/tmp/coreruleset#

With this change:

root@new-server:/tmp# git clone --branch patch-1 --depth 1 https://github.com/linuxgemini/coreruleset.git
Cloning into 'coreruleset'...
remote: Enumerating objects: 484, done.
remote: Counting objects: 100% (484/484), done.
remote: Compressing objects: 100% (439/439), done.
remote: Total 484 (delta 266), reused 110 (delta 26), pack-reused 0
Receiving objects: 100% (484/484), 442.99 KiB | 23.00 KiB/s, done.
Resolving deltas: 100% (266/266), done.
root@new-server:/tmp#

root@new-server:/tmp# cd coreruleset/
root@new-server:/tmp/coreruleset#

root@new-server:/tmp/coreruleset# git submodule init
Submodule 'docs/OWASP-CRS-Documentation' (https://github.com/coreruleset/documentation.git) registered for path 'docs/OWASP-CRS-Documentation'
Submodule 'util/regexp-assemble/lib/lib' (https://github.com/coreruleset/Regexp-Assemble.git) registered for path 'util/regexp-assemble/lib/lib'
root@new-server:/tmp/coreruleset#

root@new-server:/tmp/coreruleset# git submodule update --recursive
Cloning into '/tmp/coreruleset/docs/OWASP-CRS-Documentation'...
Cloning into '/tmp/coreruleset/util/regexp-assemble/lib/lib'...
Submodule path 'docs/OWASP-CRS-Documentation': checked out '9038febc90bac8a7d769194f0645a636ad64856b'
Submodule path 'util/regexp-assemble/lib/lib': checked out '78d230b8c8f3640a76aedf4849afc10130762eb0'
root@new-server:/tmp/coreruleset#

@fzipi
Copy link
Member
fzipi commented Mar 31, 2022

Thanks for the patch. Makes sense for anonymous recursive cloning.

Just to leave it here documented, anyone using github regularly should have

[url "ssh://git@github.com/"]
        insteadOf = https://github.com/

in theirs .gitconfig, making this change no-op for them.

@fzipi
Copy link
Member
fzipi commented Mar 31, 2022

@lifeforms @RedXanadu Do any of you see any problem with this change?

@lifeforms
Copy link
Member

Looks fine! I have little experience with Git submodules so this didn't occur to me.

@RedXanadu
Copy link
Member

I think that seems reasonable. I can't think of any problems this change would cause, so should be fine, I think.

@theseion
Copy link
Contributor
theseion commented Apr 1, 2022

Yes, https is the way to go. I intentionally did the same for the regexp-assemble submodule.

@fzipi
Copy link
Member
fzipi commented Apr 1, 2022

Thanks @linuxgemini ! Merging now.

@fzipi fzipi merged commit ce73e17 into coreruleset:v3.4/dev Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0