diff --git a/script/install.deb.sh b/script/install.deb.sh index 161f198..66c7193 100755 --- a/script/install.deb.sh +++ b/script/install.deb.sh @@ -53,8 +53,9 @@ get_arch() { # 添加 APT 源并更新 add_apt_repository() { - echo "deb [trusted=yes] https://${GITEA_SERVER}/api/packages/${GITEA_OWNER}/debian stable main" \ - >/etc/apt/sources.list.d/xxxigcc.list + curl https://${GITEA_SERVER}/api/packages/${GITEA_OWNER}/debian/repository.key -o /etc/apt/keyrings/gitea-${GITEA_OWNER}.asc + echo "deb [signed-by=/etc/apt/keyrings/gitea-${GITEA_OWNER}.asc] https://${GITEA_SERVER}/api/packages/${GITEA_OWNER}/debian stable main" \ + >/etc/apt/sources.list.d/${GITEA_OWNER}.list apt-get update -qq }