checkout: Private repository submodule sync failed.
- yml setting.
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
ref: develop
submodules: true
- actions log
Please fix it. 🙏
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 6
- Comments: 27 (4 by maintainers)
Commits related to this issue
- action: checkout submodules see: https://github.com/actions/checkout/issues/14 — committed to ksauzz/dotfiles by ksauzz 4 years ago
- action: checkout submodules see: https://github.com/actions/checkout/issues/14 — committed to ksauzz/dotfiles by ksauzz 4 years ago
- Update .gitmodules Use HTTPS url for ADL So that github action can pull it https://github.com/actions/checkout/issues/14 — committed to paul-thompson-helix/helix-adl-tools by paul-thompson-helix 4 years ago
- Update .gitmodules Use HTTPS url for ADL So that github action can pull it https://github.com/actions/checkout/issues/14 — committed to paul-thompson-helix/helix-adl-tools by paul-thompson-helix 4 years ago
- Update .gitmodules Use HTTPS url for ADL So that github action can pull it https://github.com/actions/checkout/issues/14 — committed to helix-collective/helix-adl-tools by paul-thompson-helix 4 years ago
- add 'submodules: recursive' (see https://github.com/actions/checkout/issues/14) — committed to jdpipe/OpenModelica by jdpipe 3 years ago
- new github security see https://github.com/actions/checkout/issues/14#issuecomment-523916396 — committed to monkins1010/Verus-Desktop by monkins1010 2 years ago
I ran into this same issue and made a slightly different tweak. As part of my workflow I use
.gitconfig
to tweak the URLs. That way I don’t have to switch from using the git protocol to https in my.gitmodules
file and affect my development setup.As my first step in my YAML file, before running
actions/checkout
withsubmodules: true
:@TingluoHuang I feel like this issue should be reopened if it’s not the desired behavior, and if it is I think it needs to be better documented. I can open another issue if that is desirable.
Thank you! It works!
If this helps anyone, this is working for me:
git@github.com/user/repo.git
(maybe via submodules/homebrew/a script/something else)runs-on: [macOS-latest]
This issue occurs not because of ssh, but because of private repository. submodule is in the same owner’s repository, but the issue occurs. 😢
Big thanks to @rcoup for sharing the solution. I used it directly in the yml. Had to be careful because of the colon:
it works for me as a solution 2023:
@maxilevi have your try set
token
to be your PAT? the defaultGITHUB_TOKEN
might not have permission to your submodules repo.This solution was a year ago. I don’t use submodules anymore. If you continue to have difficulties, I recommend you to package and use the module. Very easy!!! (https://docs.github.com/en/packages)
Good luck 👍
@trusktr look carefully at your error message. It’s failing to pull from bitbucket, not github. You’ll need a similar
insteadOf
for it.@joeshaw I’m having no luck with your approach.
I made a personal access token with the scope
public_repo
, then in my repo that has the submodules I created a secret calledACCESS_TOKEN
and pasted the token in there.This is what I have in my yaml file:
which results in the same errors as others above:
Did I do something obviously wrong?
EDIT: I gave up, and converted all my git submodule URLs to
https
format inside.gitmodules
. That worked fine.@socar-baegoon Thank you. I got it working following your instructions.
@socar-baegoon did you configure your submodule via
ssh
? can you try configure your submodule usinghttps://github.com/org/repo
format?