mirror of
https://github.com/actions/checkout.git
synced 2025-03-28 11:00:05 +01:00
Handle submodules with SSH URLs
This is just a documentation change, explaining how to fix submodules that are configured to use SSH URLs instead of HTTPS URLs. Spent a while banging my head on the wall and hope this saves someone else the pain. This is helpful for teams that use the SSH protocol for local development so don't want to change the mechanism that pulls in the submodules. Using `insteadOf` seems a bit nicer than than setting up a deploy keypair.
This commit is contained in:
parent
db41740e12
commit
b8bc84b504
1 changed files with 1 additions and 0 deletions
|
@ -180,6 +180,7 @@ jobs:
|
|||
- name: Checkout submodules
|
||||
shell: bash
|
||||
run: |
|
||||
git config --global url."https://github.com/".insteadOf "git@github.com:"
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue