Closed DethRaid closed 4 years ago
@DethRaid make sure to pin to checkout/actions@v1
which will restore the functionality. Currently it's not supported in v2
I actually made a PR to do just that: https://github.com/NovaMods/nova-renderer/pull/225
It's really great when I merge a PR that had no CI failures, only for master to have CI failures because GitHub removed a feature I was using
I guess it's my own fault for not using a specific version of this Action but it still sucks
Are there plans to support submodules in v2? I'd appreciate the perf improvements, but I do need submodules. 😄
Of course, for now I'll stick with v1.
Submodules with SSH checkout would be great
Hey @ericsciple!
Thanks for your fixes in #112. In our organization we have to deal with submodules a lot and thus I would like to kindly ask why the shortcut of with.submodules
was removed from v2? I don't find the
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
easy to use considering that I maintain many repositories. Would it be possible to revive the with.submodules
shortcut?
good feedback @chrispat fyi
@ericsciple, @chrispat, any updates about this issue? Did you consider to reopen it?
reopening and mark as enhancement for consideration
This only seems to work for submodules using https.
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
I need it to work via SSH. Anyone knows how to make this work with SSH?
@marcofranssen you can use https://github.com/marketplace/actions/webfactory-ssh-agent to spawn an ssh-agent
and add appropriate SSH private keys there. After that, your tools that use SSH should pick them up.
@webknjaz thanks, will give that a try as well. I finally managed to fix it by replacing the ssh with https address as explained in https://github.com/actions/checkout/pull/140/files
Just to provide some background context.
We chose to leave submodules out of the v2 rewrite for two main reasons. First because Actions is a per repository app installation the default token does not provide access to other private repositories even in the the same org or account. Second many developers configured their submodules to use SSH instead of HTTPS and in that case even public submodules would fail.
As such we decided to take a step back and see what options we had to provide a better support for public and private submodules using HTTPS or SSH. Unfortunately the developer who had been working on this issue had to take some unexpected time off to attend to a family matter.
He is back now and you should expect to see an update coming to the repo with our proposal for how we would like to add this functionality back. We look forward to the communities comments on the pull request.
He is back now and you should expect to see an update coming to the repo with our proposal for how we would like to add this functionality back.
Is it expected to be a fix to v2 or a new v3?
Since it should just be additive it will be an update to v2.
Opened a PR to propose SSH support here which will help for users scripting submodule checkout.
Will open a separate proposal shortly for a first-class submodules
input.
A related problem with Rust is cargo
downloading crates from private repos. I solved this problem by creating a PAT and adding it to the repo's secrets named GITHUB_PAT
:
echo 'https://USERNAME_OF_PAT:${{secrets.GITHUB_PAT}}@github.com' >~/.git-credentials
git config --global credential.helper store
cargo test
Worked like a charm!
Can USERNAME_OF_PAT
be omitted? Can you use either https://x-auth-token:${{secrets.GITHUB_PAT}}@github.com
or https://${{secrets.GITHUB_PAT}}@github.com
?
An input submodules
has been added now. I merged to master, try it out and let me know. Collecting feedback and will update the v2
tag next week.
Also I'm hoping to merge support for SSH soon.
I created a new issue to collect feedback on the submodules
input - in master now, will update v2
tag next week.
Thanks all for the feedback! I updated V2 to include the recent submodule/SSH changes from master.
How do I checkout with submodules?
Before the most recent commit to master (https://github.com/actions/checkout/commit/e347bba93bdcadab0b55e4b333254f9bb40bdb0c) I could use
submodules:true
to checkout with submodules.. but it looks like yalls just removed that?This change caused my most recent Actions checks (https://github.com/NovaMods/nova-renderer/runs/331364250) to fail to checkout
Unless I'm missing something, it seems that yalls updated the checkout action to not support submodules and that broke my Actions check