I downloaded the latest Unreal Engine repo from github and opened the setup.bat file as per the instruction on the Official Page. The command-line opened-up and started downloading dependencies and everything looked fine until it reached 30% progress, after which it threw an error:
Checking dependencies... Updating dependencies: 30% (12936/41030), 1702.0/9123.9 MiB | 5.04 MiB/s... Failed to download 'http://cdn.unrealengine.com/dependencies/3215544-fbbce13ceb6f4aaea59e20af2d659d08/36799aacce147eba397f6eacc7a0f6c9dac946d8': Can't read from pack stream (CorruptPackFileException)
Initially I thought that it was a connection issue even though I was on a 40-Mbps connection. But it seemed to get stuck on 30% with the same error everytime. So, I started searching for solutions on the internet but could not find any, except for the clue that it was possibly a connection issue.
Furthermore I also tried to clone the repo again and again with the same result (stuck on 30%)!!!
Solution:
Goto
dir-containing-the-repo
\ UnrealEngine \ Engine \ Build
Open the file (which should be in the Build folder) with your favourite editor (i.e. VS Code, Notepad):
Commit.gitdeps.xml
Search for this text:
BaseUrl="http://cdn.unrealengine.com/dependencies"
Just replace the http:// with https:// and leave the rest as it is:
Your BaseUrl should now be:
BaseUrl="https://cdn.unrealengine.com/dependencies"
Save the file.
Run Setup.bat
from the folder: dir-containing-the-repo
\ UnrealEngine