Skip to content
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

Update protocol to submodules #20726

Open
wants to merge 1 commit into
base: v4
Choose a base branch
from
Open

Update protocol to submodules #20726

wants to merge 1 commit into from

Conversation

QuellaZhang
Copy link

Submodules will no longer download as the git: protocol, reference https://github.blog/2021-09-01-improving-git-protocol-security-github/#no-more-unauthenticated-git, update the protocol to https://. Fixed #20714.

@QuellaZhang
Copy link
Author

Can someone help approve the PR? Thanks!

@stevetranby
Copy link
Contributor

I just pulled down fresh git clone to test out v4 again and ran into this issue.
Ideally someone who can merge this will also update the v3 branch with the same replace git:// with https://.

@slackmoehrle
Copy link
Contributor

slackmoehrle commented May 11, 2022

@stevetranby
I just tried v4 on an M1 machine (I finally own one) and I ran into this issue. Let's get it in front of engineering to have the fix merged for v4 and v3 branches.

I have this in .gitmodules

[submodule "tools/cocos2d-console"]
        path = tools/cocos2d-console
        url = https://github.com/cocos2d/cocos2d-console.git
[submodule "tools/bindings-generator"]
        path = tools/bindings-generator
        url = https://github.com/cocos2d/bindings-generator.git
[submodule "tests/cpp-tests/Resources/ccs-res"]
        path = tests/cpp-tests/Resources/ccs-res
        url = https://github.com/dumganhar/ccs-res.git

but I still seem to be doing the same error:

% git submodule update --init
Cloning into '/Users/jasmine/sandbox/cocos2d-x/tests/cpp-tests/Resources/ccs-res'...
fatal: remote error:
  The unauthenticated git protocol on port 9418 is no longer supported.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.
fatal: clone of 'git://github.com/dumganhar/ccs-res.git' into submodule path '/Users/jasmine/sandbox/cocos2d-x/tests/cpp-tests/Resources/ccs-res' failed
Failed to clone 'tests/cpp-tests/Resources/ccs-res'. Retry scheduled
Cloning into '/Users/jasmine/sandbox/cocos2d-x/tools/bindings-generator'...
fatal: remote error:
  The unauthenticated git protocol on port 9418 is no longer supported.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.
fatal: clone of 'git://github.com/cocos2d/bindings-generator.git' into submodule path '/Users/jasmine/sandbox/cocos2d-x/tools/bindings-generator' failed
Failed to clone 'tools/bindings-generator'. Retry scheduled
Cloning into '/Users/jasmine/sandbox/cocos2d-x/tools/cocos2d-console'...
fatal: remote error:
  The unauthenticated git protocol on port 9418 is no longer supported.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.
fatal: clone of 'git://github.com/cocos2d/cocos2d-console.git' into submodule path '/Users/jasmine/sandbox/cocos2d-x/tools/cocos2d-console' failed
Failed to clone 'tools/cocos2d-console'. Retry scheduled
Cloning into '/Users/jasmine/sandbox/cocos2d-x/tests/cpp-tests/Resources/ccs-res'...
fatal: remote error:
  The unauthenticated git protocol on port 9418 is no longer supported.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.
fatal: clone of 'git://github.com/dumganhar/ccs-res.git' into submodule path '/Users/jasmine/sandbox/cocos2d-x/tests/cpp-tests/Resources/ccs-res' failed
Failed to clone 'tests/cpp-tests/Resources/ccs-res' a second time, aborting

did I make a mistake? I also read the blog post.

@stevetranby
Copy link
Contributor

Not sure why it's not using the https version, but your git submodule command looks like it tried to clone from the git:// protocol version:

fatal: clone of 'git://github.com/dumganhar/ccs-res.git'

You need to figure out how to get the git submodule command to use the updated .gitmodules? Not sure how? Maybe you have something cached? Maybe you updated the wrong .gitmodules? Maybe you need to restart (for the proverbial fixes everything potential?)

@pvgmenegasso
Copy link

I also ran into the same issue and fixing the .gitmodules file was not sufficient. I also had to edit .git/config file and replace git refferences with https url.
I recommend adding a note on the README or approving the PR asap to avoid recurring errrors

@pvgmenegasso
Copy link

Link to pull request

@raulcesar
Copy link

Until the fix is merged, I resolved problem by running the following command (which makes git run https protocol instead of git for github.com:

git config --global url.https://github.com/.insteadOf git://github.com/

@huhuang03
Copy link

Please check this. Yes, the git protocol can't work now. The error log is:

Cloning into 'F:/cocos2d-x/tests/cpp-tests/Resources/ccs-res'...
fatal: unable to connect to github.com:
github.com[0: 20.205.243.166]: errno=Unknown error

fatal: clone of 'git://github.com/dumganhar/ccs-res.git' into submodule path 'F:/cocos2d-x/tests/cpp-tests/Resources/ccs-res' failed
Failed to clone 'tests/cpp-tests/Resources/ccs-res' a second time, aborting

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.

Fail to clone submodules due to "the unauthenticated git protocol on port 9418 is no longer supported".
6 participants