1

i am very new to Ubuntu, I am using wget command to pass authentication details and download file from svn repository by adding its URL, but i am getting the error as "wget: unrecognized option '--ask-password'"

  1. The command was: wget --user="user_name" --ask-password URL
  2. Version(wget -V) of wget is GNU wget 1.8.2
  3. when i did apt-get install wget it says:wget is already the newest version (1.17.1-1ubuntu1.4)
  4. There is confusion in version of wget and my Ubuntu version is 16.04.

I searched lot many things i didn't get any proper solution please help me to solve the issue. Thanks in advance

  • Welcome to Ask Ubuntu. The 1.17.1-1ubuntu1.4 is the latest (packages.ubuntu.com/xenial/wget) for 16.04 LTS, but the 1.17.1-1* version number refers to package version (not program version). Package version numbers are so your system can automatically upgrade packages, and have nothing to do with what's inside them. – guiverc Sep 4 '18 at 4:13
  • OK Thank you I understood , but what would be the reason for error i am getting – Akshata Sep 4 '18 at 5:45
  • You'll have to wait for someone else with experience in that option (If I knew it, I would have said), or possibly look at askubuntu.com/questions/29079/… (how do i provide a username and password to wget; specifically the 81 upvote answer) – guiverc Sep 4 '18 at 6:25
  • 1
    Possible duplicate of How do I provide a username and password to wget? – guiverc Sep 4 '18 at 6:26
  • Please add the output of which wget and what version you get with /usr/bin/wget -V. Seems your system uses a wrong wget ?! – pLumo Sep 4 '18 at 13:02
2

--ask-password is a relatively old option. Introduced in 2012 with version 1.12.

However, the version of Wget you're using is even older, heck, its ancient. v1.8.2 of Wget was released in 2002! 16 years ago. You really need to update your version of Wget to something newer. There have been multiple vulnerabilities that have been fixed since then not to mention the various number of new features added.

I don't know much about Ubuntu, but I guess 16.04 is a LTS release which is currently supported. Which means its repositories should support something a lot newer. You should look into why your repositories are pointing only to such an old version of Wget

  • Consider to add links to actual man-pages of wget. – N0rbert Sep 4 '18 at 18:52
  • I don't see how a link to the Wget man page is relevant here, unless you link to both the current and the page for 1.8. – darnir Sep 5 '18 at 14:56
0

After uninstalling wget and reinstalling it I got newer version. It works fine. I am able to download the file that I needed by passing authentication details. I did:

sudo apt purge --auto-remove wget
sudo apt install wget
  • The same could be achieved in a single Apt command: sudo apt-get install -t "$(lsb_release -sc)" --reinstall wget. – David Foerster Sep 5 '18 at 17:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.