Score:2

Getting a failed to fetch when running apt-get update with bintray

in flag

Running sudo apt-get update on ubuntu 20.04.2 LTS is giving me this error:

Hit:1 https://download.docker.com/linux/ubuntu focal InRelease
Ign:2 http://binaries.erlang-solutions.com/debian focal InRelease
Hit:3 http://binaries.erlang-solutions.com/debian focal Release
Hit:4 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:6 https://packages.microsoft.com/ubuntu/21.04/prod hirsute InRelease
Hit:7 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:8 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Err:9 https://dl.bintray.com/sbt/debian  InRelease
  403  Forbidden [IP: 35.155.141.94 443]
Hit:10 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done
E: Failed to fetch https://dl.bintray.com/sbt/debian/InRelease  403  Forbidden [IP: 35.155.141.94 443]
E: The repository 'https://dl.bintray.com/sbt/debian  InRelease' is no longer 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.

How can I run an update without getting this error? Is it a matter of somehow removing this repository to get updates from?

The last thing I did was try and install the dotnet sdk on my system:

wget https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb

But I haven't run an update in a while so maybe it could have been something else...

Update

I am unable to update my server now b/c of this error. Is there a way to just skip this repository somehow? Does this package get read by everyone or is it just mine instance b/c I was trying to install a package and now it has added this repo to my list of resources to check for updates?

Update 2

ls -alFh /etc/apt/sources.list.d

drwxr-xr-x 7 root root 4.0K Nov 22 16:08 ../
-rw-r--r-- 1 root root  183 Dec  3 12:25 erlang-solutions.list
-rw-r--r-- 1 root root  183 Dec  3 12:25 erlang-solutions.list.save
-rw-r--r-- 1 root root   91 Dec  3 12:25 microsoft-prod.list
-rw-r--r-- 1 root root   91 Dec  3 12:25 microsoft-prod.list.save
-rw-r--r-- 1 root root   40 Dec  3 12:25 sbt.list
-rw-r--r-- 1 root root   40 Dec  3 12:25 sbt.list.save

cat /etc/apt/sources.list

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu/ focal main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu/ focal universe
# deb-src http://archive.ubuntu.com/ubuntu/ focal universe
deb http://archive.ubuntu.com/ubuntu/ focal-updates universe
# deb-src http://archive.ubuntu.com/ubuntu/ focal-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://archive.ubuntu.com/ubuntu/ focal multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ focal multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ focal-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu focal partner
# deb-src http://archive.canonical.com/ubuntu focal partner

deb http://security.ubuntu.com/ubuntu/ focal-security main restricted
# deb-src http://security.ubuntu.com/ubuntu/ focal-security main restricted
deb http://security.ubuntu.com/ubuntu/ focal-security universe
# deb-src http://security.ubuntu.com/ubuntu/ focal-security universe
deb http://security.ubuntu.com/ubuntu/ focal-security multiverse
# deb-src http://security.ubuntu.com/ubuntu/ focal-security multiverse
deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable
# deb-src [arch=amd64] https://download.docker.com/linux/ubuntu focal stable
nobody avatar
gh flag
did you see this https://github.com/sbt/sbt/issues/6445
Someone avatar
my flag
Are you having a lot of ppas?
in flag
@someone what do you mean? sorry not sure I understand.
abu-ahmed al-khatiri avatar
in flag
did you see this https://github.com/sbt/sbt/issues/6446, the repository is not publicly accessible. try to add new repo`https://repo.scala-sbt.org/scalasbt/debian` from their community.
in flag
@abu-ahmedal-khatiri How do I remove and add that one?
lemrm avatar
th flag
remove the responsible ppa as described [here](https://askubuntu.com/questions/1214685/cant-remove-ppa-by-add-apt-repository)
in flag
@lemrm I'm confused b/c I don't recall adding it explicitly.... so I'm not sure of the command to remove it
sancho.s ReinstateMonicaCellio avatar
Please see fully updated answer.
Score:2

I will first answer your specific questions, ...

  1. How can I run an update without getting this error? Is it a matter of somehow removing this repository to get updates from? Is there a way to just skip this repository somehow? (I am listing them all together since they have all the same answer). Yes, see comand sudo mv ... suggested below.
  2. Does this package get read by everyone or is it just mine instance b/c I was trying to install a package and now it has added this repo to my list of resources to check for updates? It gets read by everyone, since the changes were introduced in a system-wide location, /etc/apt/sources.list.d/.

... and then expand as follows.


You have to clarify what you want to do. For the various cases:
  1. If you simply want to update, remove the failing repos from your /etc/apt/sources.list and /etc/apt/sources.list.d/. You could apply several methods to remove ppas added to /etc/apt/sources.list.d/, e.g. simply renaming files /etc/apt/sources.list.d/<myppa>.list to something like <myppa>.list.save.

     $ sudo mv /etc/apt/sources.list.d/sbt.list /etc/apt/sources.list.d/sbt.list.save
    

    This way, you would keep your files just in case. That should be enough to get you going.

  2. If you additionally want to update sbt, execute

     $ echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | sudo tee /etc/apt/sources.list.d/sbt.list
     $ echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | sudo tee /etc/apt/sources.list.d/sbt_old.list
     $ curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo apt-key add
     $ sudo apt update
     $ sudo apt install sbt
    

    Commands slightly modified from this official source (apt-get -> apt). Old repos https://dl.bintray.com/loadimpact/debian and https://dl.bintray.com/sbt/debian/sbt-1.5.5.deb are now forbidden. This is similar to what abu-ahmed al-khatiri quotes.

  3. If you want to update other packages that belong to failing repos, then please clarify that, so we can help with the specific cases.


I also note a couple of points about your Microsoft products.
  1. You installed packages-microsoft-prod.deb from 16.04. You should install the package for the correct version, 20.04.

  2. It is often safer to use sudo gdebi <pkg>.deb than sudo dpkg -i <pkg>.deb (as instructed in item 1 above). In this case, given that instructions come directly from MS, it is likely the same.

  3. You are hitting a repo for hirsute 21.04, Hit:6 https://packages.microsoft.com/ubuntu/21.04/prod hirsute InRelease (likely in your microsoft-prod.list). You should remove that and add the repo for focal 20.04. Follow these instructions under Ubuntu 20.04 (Focal).


I suggest you post in the question the output of
$ uname -a
$ cat /etc/apt/sources.list
$ ls -alFh /etc/apt/sources.list.d

Related:

  1. Can no longer use sudo apt update. Running 20.04
in flag
ok I see sbt.list and sbt.list.save in the /etc/apt/sources.list.d/ folder.... should I remove those 2 entries?
in flag
updated my quesiton with those directory values...
sancho.s ReinstateMonicaCellio avatar
@Blankman - `*.save` are not read by `apt`, so you would be ok with only removing `/etc/apt/sources.list.d/sbt.list`. You still have to clarify if you only mean to get rid of the errors, or if you need sbt from somehere in the galaxy.
Score:2
in flag
Err:9 https://dl.bintray.com/sbt/debian  InRelease     
 403  Forbidden [IP: 35.155.141.94 443]     
 ...   
E: Failed to fetch https://dl.bintray.com/sbt/debian/InRelease  403  Forbidden [IP: 35.155.141.94 443]   
E: The repository 'https://dl.bintray.com/sbt/debian  InRelease' is no longer signed.    
N: Updating from such a repository can't be done securely, and is therefore disabled by default.

That's mean the repo is not publicly accessible [2].

What should you do:

  1. Remove the old Repo

    sudo add-apt-repository --remove "deb http://dl.bintray.com/sbt/debian /"   
    sudo rm -fv /etc/apt/sources.list.d/sbt.list
    sudo rm -fv /etc/apt/sources.list.d/sbt.list.save
    sudo apt update
    

    Based on your sources list. simply remove .list files.

  2. Install sbt package from new Repo [3]

    sudo apt install apt-transport-https curl gnupg -yqq
    echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | sudo tee /etc/apt/sources.list.d/sbt.list
    echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | sudo tee /etc/apt/sources.list.d/sbt_old.list
    curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo -H gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/scalasbt-release.gpg --import
    sudo chmod 644 /etc/apt/trusted.gpg.d/scalasbt-release.gpg
    sudo apt update
    sudo apt install sbt     
    

    or you can install sbt package from TGZ archives through sdk manager:

    wget https://github.com/sbt/sbt/releases/download/v1.5.5/sbt-1.5.5.tgz     
    sudo tar xzvf sbt-1.5.5.tgz -C /usr/share/     
    sudo update-alternatives --install /usr/bin/sbt sbt
    sdk install sbt
    

Additionally
The ssl of https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823 may not work on 18.04 since it's using a gnupg. we can download the public key using web API. Run:

sudo apt-key adv --keyserver hkps://keyserver.ubuntu.com:443 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823

Hope this Helps.

Related:

in flag
strange, I ran your first 3 commands to remove and running `sudo apt update` it gave the same error again...
abu-ahmed al-khatiri avatar
in flag
@Blankman see my updated.
Ali Sarshogh avatar
mx flag
it works! for my error here: Get:25 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [1444 kB] Err:26 https://dl.bintray.com/sbt/debian InRelease 403 Forbidden [IP: 35.155.141.94 443] Get:27 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB] E: Failed to fetch https://dl.bintray.com/sbt/debian/InRelease 403 Forbidden [IP: 35.155.141.94 443] E: The repository 'https://dl.bintray.com/sbt/debian InRelease' is not signed. [Container] 2021/12/03 21:52:43 Command did not exit successfully apt update exit status 100
abu-ahmed al-khatiri avatar
in flag
@AliSarshogh see my updated.
Score:0
in flag

Bintray is shutdown and not hosting sbt repository anymore so You need to update sbt repo.

First remove source list files of old sbt repo.

sudo rm -f /etc/apt/sources.list.d/sbt*

Also check /etc/apt/source.list file and make sure that you remove entries of old sbt repository.

Install new sbt repository source list and gpg key.

echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | sudo tee /etc/apt/sources.list.d/sbt.list
echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | sudo tee /etc/apt/sources.list.d/sbt_old.list
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo apt-key add
sudo apt-get update
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.