Debian repos over HTTPS

I've been using deb.debian.org as the main debian repo on my servers pretty much since it's become available.

I've recently realized that the service is available over HTTPS, and since I'm all about encrypting all of the things, I figured I'd configure it on my servers.

This is going to be a very short post on how to do the same.

Required package

apt can't use repositories available over https without installing a required package first.

apt install apt-transport-https

The source.list file

Once the package has been installed, you can edit your /etc/apt/sources.list file with the following content :

deb https://deb.debian.org/debian stable main contrib non-free
deb https://deb.debian.org/debian-security stable/updates main contrib non-free
deb https://deb.debian.org/debian stable-updates main contrib non-free
deb https://deb.debian.org/debian stretch-backports main contrib non-free

Or, if you'd rather follow the stretch releases instead of stable (to avoid upgrading to buster until you're ready once it will become the new stable) :

deb https://deb.debian.org/debian stretch main contrib non-free
deb https://deb.debian.org/debian-security stretch/updates main contrib non-free
deb https://deb.debian.org/debian stretch-updates main contrib non-free
deb https://deb.debian.org/debian stretch-backports main contrib non-free

Conclusion

That's all! As I said, this was going to be a short post.

As always, feel free to contact me here, on Twitter or on the Fediverse!