1Password / for-open-source

Get a 1Password team account for free to support your open source initiatives!
1.6k stars 792 forks source link

1password CLI installation on ubuntu fails due to file size mismatch #910

Closed gustaff-weldon closed 3 months ago

gustaff-weldon commented 3 months ago

I do not know what is the best place to report this. Installation of 1password CLI on Ubuntu (docker) is failing due to size mismatch. Following the instructions on https://developer.1password.com/docs/cli/get-started/ :

curl -sS https://downloads.1password.com/linux/keys/1password.asc | \
gpg --dearmor --output /usr/share/keyrings/1password-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/1password-archive-keyring.gpg] https://downloads.1password.com/linux/debian/$(dpkg --print-architecture) stable main" |
tee /etc/apt/sources.list.d/1password.list
mkdir -p /etc/debsig/policies/AC2D62742012EA22/
curl -sS https://downloads.1password.com/linux/debian/debsig/1password.pol | \
tee /etc/debsig/policies/AC2D62742012EA22/1password.pol
mkdir -p /usr/share/debsig/keyrings/AC2D62742012EA22
curl -sS https://downloads.1password.com/linux/keys/1password.asc | \
gpg --dearmor --output /usr/share/debsig/keyrings/AC2D62742012EA22/debsig.gpg
apt update && apt install 1password-cli

Gives the following error:

deb [arch=arm64 signed-by=/usr/share/keyrings/1password-archive-keyring.gpg] https://downloads.1password.com/linux/debian/arm64 stable main
<?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>
File '/usr/share/debsig/keyrings/AC2D62742012EA22/debsig.gpg' exists. Overwrite? (y/N) y
Hit:1 https://downloads.1password.com/linux/debian/arm64 stable InRelease
Hit:2 http://ports.ubuntu.com/ubuntu-ports jammy InRelease
Hit:3 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease
Hit:4 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease
Hit:5 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  1password-cli
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 5472 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 https://downloads.1password.com/linux/debian/arm64 stable/main arm64 1password-cli arm64 2.25.0-1 [5472 kB]
Err:1 https://downloads.1password.com/linux/debian/arm64 stable/main arm64 1password-cli arm64 2.25.0-1
  File has unexpected size (5486214 != 5472230). Mirror sync in progress? [IP: 18.244.102.114 443]
  Hashes of expected file:
   - SHA512:e04c3b77728e60680ab73eb2cd87d63995e8d4a131afc0e2f20a070ac3ce30b486cbe2db1a202bfa869a3f0992a373918937ba222a71fbb17d2d0dbb103fa9f9
   - SHA256:39705ddff33606ed004bdf8aae5b83ec0a884f3bfdb84c85ad53b164eb59ef67
   - SHA1:558cdd5b87882fbfa41c71ba491b63dbc9bfa254 [weak]
   - MD5Sum:e9703aae970d47f0ede9b2286dc078bf [weak]
   - Filesize:5472230 [weak]
E: Failed to fetch https://downloads.1password.com/linux/debian/arm64/pool/main/1/1password-cli/1password-cli-2.25.0-1.arm64.deb  File has unexpected size (5486214 != 5472230). Mirror sync in progress? [IP: 18.244.102.114 443]
   Hashes of expected file:
    - SHA512:e04c3b77728e60680ab73eb2cd87d63995e8d4a131afc0e2f20a070ac3ce30b486cbe2db1a202bfa869a3f0992a373918937ba222a71fbb17d2d0dbb103fa9f9
    - SHA256:39705ddff33606ed004bdf8aae5b83ec0a884f3bfdb84c85ad53b164eb59ef67
    - SHA1:558cdd5b87882fbfa41c71ba491b63dbc9bfa254 [weak]
    - MD5Sum:e9703aae970d47f0ede9b2286dc078bf [weak]
    - Filesize:5472230 [weak]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

It is unclear if the package was tampered with or just published with wrong metadata.

jodyheavener commented 3 months ago

Hey @gustaff-weldon, thanks for reaching out and sorry that you're experiencing an issue with the CLI. As this repository relates to our Open Source program I'd encourage you to reach out to the team in the 1Password Developers Slack workspace to get a more prompt response. You can also open a thread in the forums, or contact support@1password.com and we'll get back to you as soon as possible.

SimonBarendse commented 3 months ago

Hi @gustaff-weldon the problem should be resolved now. Can you retry? Apologies for the inconvenience!

gustaff-weldon commented 3 months ago

Hi @SimonBarendse thank you for a prompt response, I have confirmed our docker builds with 1password-cli install are back to normal