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

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:

  • [1] https://github.com/sbt/sbt/issues/6445
  • [2] https://github.com/sbt/sbt/issues/6446
  • [3] https://github.com/apache/tvm/pull/7926

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