Error while downloading HTTPS files using wget
If I try to download the some http files, Then wget
works just fine (eg: wget download_link
). But when i try to download https files using wget
then I'm getting the following error
http request sent
403 forbidden
My problem is, I can't download http files in my college wifi. So when I try to download the file, wget
will send the http request to the server. Eventually, the download will be blocked.
To download the https file, I've tried using the following command
wget https://download_link
How to download https files (username and password is there in the download link too)?
Are there any extra options needed with wget
?
In order to use the https
protocol you will have to add the --secure-protocol=protocol
option. The protocol argument can be one of:
- auto
- SSLv2
- SSLv3
- TLSv1
There are also further related options like --no-check-certificate
telling wget
to not check server's certificate and many more.
This will prompt for password
wget --user=username --ask-password --no-check-certificate https://foo.bar.com
In this you will have to provide the password
wget --user=username --password --no-check-certificate https://foo.bar.com
Source: GNU Wget manual
Initially wget
does not support the https downloads in some destributions. We need to compile the source code manually using openssl. After that we can do https downloads
Link to compile the wget using openssl :
How to compile the wget source code