secrethub/secrethub-cli

APT update using main stable, failed to fetch due to unexpected size (402 != 400).

Closed this issue · 1 comments

Hello :)

Not sure if it's the right place to put this issue (or if it's on your end).

Since Friday 18 February, we have issue using Secrethub in our CI (github actions). This is due to an error when using the script from https://apt.secrethub.io/ (which is the script given in the doc https://secrethub.io/docs/reference/cli/install/).

The error is "File has unexpected size (402 != 400). Mirror sync in progress?"

Therefore I am not sure if we just need to wait a couple more days for the mirror to sync (but it seems a long time to me)

Waiting for your answer :)
(and sorry again if it's not the right place ;) )

How to reproduce

Create a new docker using ubuntu latest and run a bash terminal.

docker run -i -t ubuntu:latest /bin/bash

Then in the bash, follow the instructions stated in https://apt.secrethub.io/

apt-get update && apt-get install -y curl gnupg2
curl -fsSL https://apt.secrethub.io/pub | apt-key add -
echo "deb https://apt.secrethub.io stable main" > /etc/apt/sources.list.d/secrethub.sources.list && apt-get update
apt-get install -y secrethub-cli

You should see an error during the apt-get update of the 3rd line.

Log

root@d2fd2cbabb36:/# apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Get:3 https://apt.secrethub.io stable InRelease [2679 B]
Hit:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease
Get:6 https://apt.secrethub.io stable/main amd64 Packages [400 B]
Err:6 https://apt.secrethub.io stable/main amd64 Packages
  File has unexpected size (402 != 400). Mirror sync in progress? [IP: 13.32.145.117 443]
  Hashes of expected file:
   - Filesize:400 [weak]
   - SHA256:f7c0d9e046bae66ed02bada097ca5036756bc0cb8faab1ba875fc7aed1e04be8
   - SHA1:6e13648d9fb5d9c39b86d9095edc3e428e66c6de [weak]
   - MD5Sum:06a2e516db468ac83df0d52b4aae352b [weak]
  Release file created at: Thu, 26 Aug 2021 18:55:48 +0000
Fetched 2679 B in 1s (2821 B/s)
Reading package lists... Done
E: Failed to fetch https://apt.secrethub.io/dists/stable/main/binary-amd64/Packages.gz  File has unexpected size (402 != 400). Mirror sync in progress? [IP: 13.32.145.117 443]
   Hashes of expected file:
    - Filesize:400 [weak]
    - SHA256:f7c0d9e046bae66ed02bada097ca5036756bc0cb8faab1ba875fc7aed1e04be8
    - SHA1:6e13648d9fb5d9c39b86d9095edc3e428e66c6de [weak]
    - MD5Sum:06a2e516db468ac83df0d52b4aae352b [weak]
   Release file created at: Thu, 26 Aug 2021 18:55:48 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.

It seems that it is working again, the delay was just longer than expected. Closing this issue