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
Cannot checkout submodules on github.com from a repository on GitHub Enterprise Server #934
Open
Comments
WorkaroundWe can avoid this behavior by using HTTPS URL in [submodule "example"]
path = example
- url = [email protected]:nekketsuuu/example.git
+ url = https://github.com/nekketsuuu/example.git |
This was referenced Feb 16, 2023
Anything new with this issue? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm using GitHub Enterprise Server (GHES), say https://example.com, and I want to checkout a repository on https://github.com as a git submodule.
But it seems that actions/checkout@v3 with
submodules: recursive
cannot checkout a submodule located outside our GHES when a URL of the submodule is in SSH format. It raises an errorHost key verification failed.
after trying to rungit submodule update
. Full logs are the followings:What should I do to resolve this error?
Why This Failed
This error is caused by insufficient git configs for
insteadOf
. Let's see logs before fetching submodules:Here actions/checkout@v3 configures HTTPS instead of SSH for our GHES, but not for github.com. This is because our
GITHUB_SERVER_URL
is set toexample.com
. See the following codes.checkout/src/git-source-provider.ts
Lines 200 to 204 in e6d535c
checkout/src/git-auth-helper.ts
Lines 134 to 140 in e6d535c
checkout/src/git-auth-helper.ts
Lines 65 to 72 in e6d535c
checkout/src/url-helper.ts
Lines 22 to 28 in e6d535c
GITHUB_SERVER_URL
is set to "The URL of the GitHub Enterprise Server server. For example:https://[hostname]
."How to Reproduce
Click here to see steps to reproduce the above error
Create a repository on GHES and run
git submodule add
for a repository on github.com, using SSH URL. Also you can add a repository on GHES as a submodule. Then commit.gitmodules
and the submodules.Create a workflow using actions/checkout@v3 to checkout a repository including submodules.
Run the workflow.
Environment:
GitHub Enterprise Server 3.5.1
GitHub Actions on self-hosted runner on Amazon ECS
git version 2.25.1
Run actions/checkout@v3 with
Related Issue
#488
The text was updated successfully, but these errors were encountered: