Unverified Commit 77904fd4 authored by Christopher Sexton's avatar Christopher Sexton Committed by GitHub
Browse files

Handle submodules with SSH URLs (#140)

* 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.

* SSH submodules

Co-authored-by: default avatarChris Patterson <[email protected]>
parent 06218e44
Loading
Loading
Loading
Loading
+2
Changes for README.md: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -180,6 +180,8 @@ jobs:
- name: Checkout submodules
  shell: bash
  run: |
    # If your submodules are configured to use SSH instead of HTTPS please uncomment the following line
    # git config --global url."https://github.com/".insteadOf "[email protected]:"
    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