automate/020_gitea_dpr.sh

29 lines
761 B
Bash
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# https://docs.gitea.com/usage/packages/debian
URL="https://git2.ring-zero.co.uk"
OWNER="cyteen"
DISTRIBUTION="stretch"
COMPONENT="main"
KEYRING="/etc/apt/keyrings/gitea-${OWNER}.asc"
cat <<-EOF | sudo tee /etc/apt/sources.list.d/gitea.list
deb [signed-by=${KEYRING}] ${URL}/api/packages/${OWNER}/debian ${DISTRIBUTION} ${COMPONENT}"
EOF
USERNAME="cyteen"
PASSWORD="e844ba5fa9f57645eb1e32cfcb67a60d650dfbf0" # your_password_or_token
cat <<-EOF | sudo tee /etc/apt/sources.list.d/gitea-private.list
deb [signed-by=${KEYRING}] https://${USERNAME}:${PASSWORD}@${URL}/api/packages/${OWNER}/debian ${DISTRIBUTION} ${COMPONENT}"
EOF
sudo curl https://${URL}/api/packages/${OWNER}/debian/repository.key -o ${KEYRING}
udo apt-get update
#