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

Akshata
  • 11
  • Welcome to Ask Ubuntu. The 1.17.1-1ubuntu1.4 is the latest (https://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 04 '18 at 04:13
  • OK Thank you I understood , but what would be the reason for error i am getting – Akshata Sep 04 '18 at 05: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 https://askubuntu.com/questions/29079/how-do-i-provide-a-username-and-password-to-wget (how do i provide a username and password to wget; specifically the 81 upvote answer) – guiverc Sep 04 '18 at 06:25
  • 1
  • 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 04 '18 at 13:02
  • which wget gives /usr/bin/wget and /usr/bin/wget -V gives GNU Wget 1.8.2

    Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

    Originally written by Hrvoje Niksic hniksic@arsdigita.com.

    – Akshata Sep 05 '18 at 04:07

2 Answers2

3

--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

darnir
  • 262
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
David Foerster
  • 36,264
  • 56
  • 94
  • 147
Akshata
  • 11