Search code examples
gitwgetrhel7

Unable to download via wget


I am trying to download git via wget on a RHEL 7.5 box. When i open it in a browser, the file downloads. However when I try when, it hangs indefinitely.

wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.0.0.tar.gz
--2020-02-11 22:55:48--  https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.0.0.tar.gz
Resolving mirrors.edge.kernel.org (mirrors.edge.kernel.org)... 147.75.197.195, 2604:1380:1:3600::1
Connecting to mirrors.edge.kernel.org (mirrors.edge.kernel.org)|147.75.197.195|:443... connected.

I will appreciate pointers on this.


Solution

  • If it downloads via the browser, you can try adding the "-U" flag to the wget command. Copy the browser's user-agent string and use that in wget as the value for the "-U" option.

    Also, if that does not work, add the "-v" flag to curl, and paste the output here, so that someone can have a look.