Pages

404 When Contacting Apt Repositories using Chef and Test Kitchen

Jan 29, 2016

Background

I'm starting a cookbook repository for an application from scratch. The cookbook will install Docker on a Linux VM and setup some default containers.

Weirdness

I ran into this weird case today where I was trying to install Git as the first package and I kept getting a 404 when trying to contact the Ubuntu Apt repositories using Test Kitchen. The odd part is that I could reach everything else so it wasn't a guest/host networking issue. Turns out, I needed to add the "apt" cookbook as a dependency so that apt-get update will be executed initially and then packages can actually be installed. Just something interesting to remember that I seem to have forgotten since the last time I ran into this.