Skip to content

apt-key is deprecated, workaround for Raspberry Pi OS Trixie Install #17816

Closed

Description

@jordanhardee

Unfortunately apt-key no longer works for https://tailscale.com/kb/1627/install-rpi-trixie as it is deprecated.

I created a simple bash script as a workaround, however I recommend updating the official documentation with an approved workaround by Tailscale (perhaps a better script than mine, if needed). This workaround addresses the security issues that led to apt-key's deprecation by creating a new trusted location for the repo's GPG key that isn't in /etc/apt/trusted.gpg.d/.

Workaround repo: https://github.com/jordanhardee/Tailscale-Install-Script-Raspberry-Pi-OS-Trixie

My workaround script is as follows:

#!/bin/bash
    
    mkdir /etc/apt/keyrings
    wget https://pkgs.tailscale.com/stable/raspbian/trixie.asc
    gpg --output trixie.gpg --dearmor trixie.asc
    cp trixie.gpg /etc/apt/keyrings/trixie.gpg
    echo "# Tailscale packages for raspbian trixie
    deb [signed-by=/etc/apt/keyrings/trixie.gpg] https://pkgs.tailscale.com/stable/raspbian trixie main" > /etc/apt/sources.list.d/tailscale.list
    	echo "Updating package list and installing tailscale."
    rm trixie.asc
    rm trixie.gpg
    apt-get update && sudo apt-get install tailscale

Activity

  1. udf2457 commented on Nov 10, 2025

    @udf2457

    Just to add to this, the manual installation instructions were also clearly written by someone who has no concern about best practices.

    The manual instructions tell you to put keys in /usr/share/keyrings.

    They even tell you to create the directory sudo mkdir -p --mode=0755 /usr/share/keyrings 🤦

    e.g. https://tailscale.com/download/linux/debian-bookworm and https://pkgs.tailscale.com/stable/#debian-trixie

    The correct way is what @jordanhardee says ... /etc/apt/keyrings and reference in signed-by

  2. self-assigned this
    on Nov 10, 2025
  3. Erisa commented on Nov 10, 2025

    @Erisa
    Member

    We'll update the docs to align with pkgs so that it's at least not using apt-key.

    @udf2457 do you have a source showing when /etc/apt/keyrings should be used? I can look into that separately and update both pkgs and the docs with that advice.

  4. Erisa commented on Nov 10, 2025

    @Erisa
    Member
  5. jordanhardee commented on Nov 10, 2025

    @jordanhardee
    Author

    Thanks Erisa!! Will link to this thread in my repo so people know it's being/ has been addressed. I appreciate you all!

  6. jordanhardee commented on Nov 11, 2025

    @jordanhardee
    Author

    Just to add to this, the manual installation instructions were also clearly written by someone who has no concern about best practices.

    The manual instructions tell you to put keys in /usr/share/keyrings.

    They even tell you to create the directory sudo mkdir -p --mode=0755 /usr/share/keyrings 🤦

    e.g. https://tailscale.com/download/linux/debian-bookworm and https://pkgs.tailscale.com/stable/#debian-trixie

    The correct way is what @jordanhardee says ... /etc/apt/keyrings and reference in signed-by

    I'd say they probably were following best practices to the best of their knowledge, it just happened to be outdated. They probably didn't know about the apt-key deprecation.

  7. udf2457 commented on Nov 11, 2025

    @udf2457

    @jordanhardee The deprecation warning was introduced in Debian 11 Bullseye way back in 2021. There have since been two Debian releases.

    But anyway. Let's not argue over semantics. I'm glad its finally being addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions