Ubuntu – Sudo apt update always giving Clearsigned file isn’t valid, got ‘NOSPLIT’ (does the network require authentication?)


So I am on my college network which requires me to sign in to the browser before I start using the internet. I do so succesfully but on a clean install of Ubuntu, when I try to do sudo apt update, I get the following output:

$ sudo apt update
Get:1 http://in.archive.ubuntu.com/ubuntu xenial InRelease [2,847 B]
Err:1 http://in.archive.ubuntu.com/ubuntu xenial InRelease                    
Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [2,854 B]    
Err:2 http://security.ubuntu.com/ubuntu xenial-security InRelease             
Get:3 http://in.archive.ubuntu.com/ubuntu xenial-updates InRelease [2,855 B]   
Err:3 http://in.archive.ubuntu.com/ubuntu xenial-updates InRelease
Get:4 http://in.archive.ubuntu.com/ubuntu xenial-backports InRelease [2,857 B]
Err:4 http://in.archive.ubuntu.com/ubuntu xenial-backports InRelease
Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Fetched 11.4 kB in 0s (18.3 kB/s)
Reading package lists... Done
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/xenial/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: Some index files failed to download. They have been ignored, or old ones used instead.

But when I do wget http://in.archive.ubuntu.com/ubuntu/dists/xenial/InRelease, I get this output success:

2017-04-01 05:34:57  http://in.archive.ubuntu.com/ubuntu/dists/xenial/InRelease
Resolving in.archive.ubuntu.com (in.archive.ubuntu.com)...,,, ...
Connecting to in.archive.ubuntu.com (in.archive.ubuntu.com)||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 246846 (241K)
Saving to: ‘InRelease.3’

InRelease.3         100%[===================>] 241.06K   110KB/s    in 2.2s    

2017-04-01 05:35:00 (110 KB/s) - ‘InRelease.3’ saved [246846/246846]

Clearly I have internet access from my browser and on wget but when I do sudo apt (or apt-get) update I get this error.

PS: This question is not similar to other threads as their solutions do not seem to work on mine

As I have found out, this problem is happening only to me, not others on the college network. Despite setting up the network according to instructions, this still happens. Any more help would be appreciated

EDIT: So as it turns out, 50% of us in the college are facing this issue, while 50% aren't despite having no issues with the hardware and sudo apt update before the last week. Thanks to @David Foerster for helping me throughout all this time.

As it stands, the issue has been raised to our college's networking department 🙂

Best Answer

  • I had the same issue. It turns out that apt-get uses /etc/apt/apt.conf for the proxy settings (my browser settings are already set). Making apt.conf match my browser proxy settings solved the problem.

    /etc/apt$ cat apt.conf
    Acquire::http::proxy "http://<proxy>";
    Acquire::https::proxy "https://<proxy>";
    Acquire::ftp::proxy "ftp://<proxy>";
    Acquire::socks::proxy "socks:<proxy>";
  • Related Question