1

How can I debug the following? I set up an APT repository on my local laptop to prevent repeated downloads from Vagrant test VMs that I spin up for testing. But when I run sudo apt-get update on my guests, I get the following error:

W: The repository 'http://host-laptop-ip/pkgs' does not have a Release file.
N: Data from such a repository can't be authenticated and is potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration detail.

I have already gone through the manpage, which is what helped me create the repo in the first place. This is what I did on the host:

  1. Set up a web server (apache2) on my laptop, and put the packages I want under a virtual directory (/var/www/html/pkgs). In fact it's put under a specific path /var/www/html/pkgs/dists/$(lsb_release -s -c)/main/binary-amd64.

  2. I generated a key pair using GnuPG, made the public key accessible via a file in the same virtual directory, signed the packages using this key by using dpkg-sign.

  3. Generated the Packages, Release, and InRelease files under the pkgs and the /var/www/html/pkgs/dists/$(lsb_release -s -c)/main/binary-amd64 directories both.

This is what I did on the guest:

  1. I added the following line at the end of /etc/apt/sources.list file:

    deb [ arch=amd64 ] http<nolink>://laptop-host-ip/pkgs xenial main
    
  2. And:

    wget -O http<nolink>://laptop-host-ip/pkgs/keyFile | sudo apt-key add -
    

I have described all the details in this gist.

CppNoob
  • 111

0 Answers0