Skip to content

Instantly share code, notes, and snippets.

@claui
Created September 27, 2023 12:39
Show Gist options
  • Save claui/c77894f0c0c0cce077d0266d92a24b70 to your computer and use it in GitHub Desktop.
Save claui/c77894f0c0c0cce077d0266d92a24b70 to your computer and use it in GitHub Desktop.
Prepare 1Password installation on Debian
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFkeAh4BEACy6fUHiFi/YvXZ2E5Gs7qFL8TSKQGLt0g8w/NtBotMNveW2Nzg
aXcmJ2E0aXY7nBRtpIgRRrb7XuskDZwGmVx4PQshaZuIozS0T1kdMitobi4k3g2M
551yf1bPWl1neVJ5MmbpknnaIG6VjMHxcRKE0xXDYhpBtt7QQQw1HT8vOjUOXBUf
VIj2o7I/+cRGNgDdkbuGRccC8hSGyiWXy4FY8xPvxMSCXoL5w531ewaGl/M+mAOC
3c6T7S05CcNN50Z6wulCiDZGvuJ2547E5iU9KClAEchJH9yQ2PkLHy3OQi0lBt+4
PmGeBOIxvFVXGbtGGtx6oFZxVaYDzF+BHHHRRdUs75pWzRm5y/3j0j+O4UKLWvMx
3SN7gRRu6gP5nvOw6wdyYerci2NHx1JJKlM6d6zxEj+cJ4GoBeJQhJi3UVpDy0Hh
TX3iid9Zz1ansQrSujXU2t82695WTGau5sarheDya4niKfVOh4IDMBbA17fnqJbS
ttYiL5i4+eqXbkAItdq+skhqqUElrROC0RKiXhX00nHu+ASHYupr/1Ac9/jdk0wG
TNb1ue76aBGJHZA0U67onp/MkVEOCv04nHRZbHArM0w52v40VIaUax5ZYfLSOIkq
IkPHoywmhR7W6QVlBbjP6zWVrTAWEnPx2VDQVk1CX29n/kM/J1kE60poZQARAQAB
tDNDb2RlIHNpZ25pbmcgZm9yIDFQYXNzd29yZCA8Y29kZXNpZ25AMXBhc3N3b3Jk
LmNvbT6JAlQEEwEIAD4WIQQ/75dIRprb4V2nyoCsLWJ0IBLqIgUCWR4CHgIbAwUJ
DwmcAAULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRC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XcSfHY3G9hRIaJic6KFrjBlgwVHpRpSxhj1ydp/RghbjUBzuY22
hgpHeVdw2wFDVef9st+3XHu6JiEHrGpWjc7VTpCiiYaHAPIFWMu8B9gnQrxc9ZXw
0OzS4vu82mAiyitvw+dY3V4U5uo0q56iyswmDs2S2Kn8/510n2vdCqEtaKMV5cV+
cnF1aU1PdRct/ZMfqOC+VcfTiS/Svx5/BCie0nIATJGcYtuX9fFd4Z0V3T0N6aM7
QENgOny7X/zJgp5dWbgkv3Qyz83rz32cfcv9gSf8yUjV3/NsxrzCeKxFWFn+oPh3
+PTforlP1OsyZORh9IgtoQ5Jqk6YYnSsYkJfseZVQigVpaD2nWwSmmQHMnHmwDvP
CXKaBqnE2TXnoqXw4o8nSRvYiQEcBBABCAAGBQJZH3WeAAoJEL1Y5xxC89TUrRoH
/iGhamPA0Z/ldEtBhSYGj/307UvFywP2tlXTeJqma1XwEBzXvx6j9Xn8pLIlvFh3
/ouLmP36bY+Ftj8Im3EWGnmVm5joe5S2hDLQI7FDbWGUwJePDNaMxC/SsvVzkXJz
jAvajVAReB3Pu93SfsraNV/nNMGO4ALW+1Z1p/tzgwW7G4YpiXmRZ1EcL688MQKB
/B8IrKajadMk5avGsoPc53MFEDOboZ3lA7F9WnuS6OSX3zBqyiPYxWskAiVf2TVK
lBU54ptBq8ruhKAQqn54VJ9A3jX31XAcEv1YBw44bPvZzMPxc51ufODSWN80Y5Tu
i5hpxQVKjCfhjtBaYrwtTnuIXQQQEQIAHRYhBCIx3/CGnuOliFrn1PeHeivJxAwx
BQJZsEYgAAoJEPeHeivJxAwxo6oAn1dFjYZNzLyIhZeKaeIiZwGmq/9EAJ4+fRg9
P4I7jHwe0BN3iNAG1nKbGg==
=hYVe
-----END PGP PUBLIC KEY BLOCK-----
<?xml version="1.0"?>
<!DOCTYPE Policy SYSTEM "https://www.debian.org/debsig/1.0/policy.dtd">
<Policy xmlns="https://www.debian.org/debsig/1.0/">
<Origin Name="1Password" id="AC2D62742012EA22" Description="Password manager and secure wallet"/>
<Selection>
<Required Type="origin" File="debsig.gpg" id="AC2D62742012EA22"/>
</Selection>
<Verification MinOptional="0">
<Required Type="origin" File="debsig.gpg" id="AC2D62742012EA22"/>
</Verification>
</Policy>

Bash snippet to prepare 1Password installation:

(
  set -eu -o pipefail;

  # Based on:
  # https://developer.1password.com/docs/cli/get-started/#install
  sudo gpg --dearmor \
    --output /usr/share/keyrings/1password-archive-keyring.gpg \
    1password.asc;

  printf 'deb [arch=%s signed-by=%s] %s/%s %s %s\n' \
    "$(dpkg --print-architecture)" \
    '/usr/share/keyrings/1password-archive-keyring.gpg' \
    'https://downloads.1password.com/linux/debian' \
    "$(dpkg --print-architecture)" \
    stable main \
    | sudo tee /etc/apt/sources.list.d/1password.list;

  FINGERPRINT='AC2D62742012EA22'
  POLICY_DIR="/etc/debsig/policies/${FINGERPRINT}/"
  sudo mkdir -p "${POLICY_DIR}"
  sudo tee "${POLICY_DIR}/1password.pol" < 1password.pol
  KEYRING_DIR="/usr/share/debsig/keyrings/${FINGERPRINT}"
  sudo mkdir -p "${KEYRING_DIR}"
  sudo gpg --dearmor \
    --output "${KEYRING_DIR}/debsig.gpg" 1password.asc
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment