I have encounter an error "Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)"
Asked Answered
S

8

13

enter image description here

when I run sudo apt update

It shows:

E: Failed to fetch http://packages.microsoft.com/repos/code/dists/stable/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: The repository 'http://packages.microsoft.com/repos/code stable InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Sphagnum answered 29/9, 2021 at 11:6 Comment(1)
This seems like a recent issue that needs to be resolved by a developer. I don't need to update the package at the moment. So for now I have removed packages.microsoft.com/repos/code repo from the list of other repos that I update from. After I did that I was able to run sudo apt update with no problem. This link might be helpful.Aliciaalick
A
5

I ran into this issue too today. After reading a bunch of other threads on it. It is in most cases have to do with network connectivity and in my case an issue on Microsoft's end. After half an hour or so it resolved by itself.

Avouch answered 29/9, 2021 at 13:51 Comment(1)
It worked in my case.Verst
T
4

This seems to be a recurring issue with how Microsoft manages their repositories. I ran into this today, and after investigating I found this thread, and several others on GitHub. Conclusion always seems to be that this is an issue with Microsoft, and they need to do some unknown repository maintenance actions to fix the issue.

All you can do is 1) report it to Microsoft e.g. via GitHub issues on relevant repositories, or 2) wait and try again later.

Some examples:

In case Microsoft ends up changing things around they have documented where to report issues at https://packages.microsoft.com/docs/readme.txt

In the mean time as others have suggested you can of course configure your system to skip the repository if you need to do it temporarily to get something else done, but generally just disabling repositories is not a good idea as you will then miss out on updates for the software you've installed from there.

Thamos answered 24/4, 2024 at 11:0 Comment(0)
T
0

You just had to renew the the apt repository and signing key. have a look here:

https://code.visualstudio.com/docs/setup/linux

the following code will fix your problem:

wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/trusted.gpg.d/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
rm -f packages.microsoft.gpg
Testy answered 25/10, 2021 at 9:24 Comment(1)
Will this work with Linux Mint?Cuirassier
C
0

Software&Updates - Other Software - find something http://packages.microsoft.com... and uncheck this

Crumple answered 5/8, 2022 at 7:7 Comment(0)
M
0

I encounter this problem in WSL of Debian, Ubuntu2004 or Ubuntu2204, when I execute sudo apt update.

For Debian, I install the ca-certificates.deb,apt-transport-https together with their dependencies openssl.deb manually, which were download from https://www.debian.org/distrib/packages.

Then I replace the http in the /etc/apt/sources.list to https.

Finally, execute sudo apt update, Clearsigned file isn't valid, got 'NOSPLIT' never appears.

Madel answered 9/5, 2023 at 2:7 Comment(0)
S
0

In Software & Updates at Authentication page I click Restore defaults and in Ubuntu Software page I choose only Canonical-supported free and open-source software (main) and Proprietary drivers for devices (restricted) and Download from: Main server

And running sudo apt-get update and sudo apt-get upgrade or nala instead of apt-get in my case fix the error. The problem was I suppose because I chose some servers for updates mainly and now they are not available

Setback answered 8/6, 2024 at 3:27 Comment(0)
L
0

For people after 1st of June 2024, with Debian buster, please read this:

https://github.com/oerdnj/deb.sury.org/issues/2098

In short, Sury.org is end of support for Debian buster. Please update to next Debian stable version.

(I know this is not a solution. But really, read that!)

Lanam answered 7/8, 2024 at 8:19 Comment(0)
G
-1

A workaround, use vim/nano to edit the source.list file.

sudo vim /etc/apt/sources.list.d/vscode.list

Comment the line with #

# deb [arch=amd64,arm64,armhf] http://packages.microsoft.com/repos/code stable main

save it :wq and re-run the update.

This solution is discussed in reddit

⚠️ By running the chattr +i cmd found in Reddit you will restrict the future edit for the file, use chattr -i to make it editable.

Gastrotrich answered 29/9, 2021 at 12:50 Comment(2)
Thanks for the solution. It automatically resolved after 1-2 hours. There was an issue commit of the new build Microsoft vscode.Sphagnum
I have the same issue but instead of the microsoft link it says "mirrors.evowise.com/linuxmint/packages" among others.Cuirassier

© 2022 - 2025 — McMap. All rights reserved.