-
Notifications
You must be signed in to change notification settings - Fork 787
Description
In a comment on #1180 (comment), there's a suggestion to configure the submodules of this repo to pull via ssh instead of https protocol. I tried this out in a repo fork (https://github.com/oddhack/Vulkan-Samples) and it does seem more reliable. Download performance is about halved, ca. 15-30 MB/s instead of the 20-50 MB/s I get over https when it's working, which is a drawback (maybe just particular to my machine, which is an aging Ryzen 2600?)
The main drawback appears to be that using ssh protocol requires configuring a github ssh key setup (AFAICT). This is a no-op for me since I always use ssh to github, but it could impose a transition cost or unacceptable restriction on some repo users.
Unfortunately, there doesn't (seem) to be any way to configure this on a connection basis, e.g. clone the submodules using the same protocol as Vulkan-Samples itself. Again AFAICT, the protocol selection is controlled by .gitmodules in the default repository branch, and you don't have access to the default repository branch when performing a 'git clone --recurse-submodules' until after the entire operation is finished. The multi-step procedure outlined in the comment is workable but is not nearly as simple as the --recurse-submodules variant:
git clone git@github.com:KhronosGroup/Vulkan-Samples.git
cd Vulkan-Samples
perl -i -p -e 's|https://(.*?)/|git@\1:|g' .gitmodules
git submodule sync
git submodule updatePossibly we could add this to the recent NOTE from #1194 as a workaround? I could also implement it in the Vulkan-Site repository setup target.