sstephenson / bats

Bash Automated Testing System
MIT License
7.12k stars 519 forks source link

E: Some index files failed to download. They have been ignored, or old ones used instead. #229

Closed edouard-lopez closed 7 years ago

edouard-lopez commented 7 years ago

I added the foloowing config to install bats on CircleCI:

  steps:
      - checkout
      - run: sudo apt-get --yes install software-properties-common 
      - run: sudo add-apt-repository --yes ppa:duggan/bats;
      - run: sudo apt-get update
      - run: sudo apt-get --yes install rsync bats

Error

#!/bin/bash -eo pipefail
sudo apt-get update

Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
Ign http://ppa.launchpad.net jessie InRelease
Ign http://deb.debian.org jessie InRelease
Get:2 http://deb.debian.org jessie-updates InRelease [145 kB]
Get:3 http://security.debian.org jessie/updates/main amd64 Packages [558 kB]
Ign http://ppa.launchpad.net jessie Release.gpg
Hit http://deb.debian.org jessie Release.gpg
Ign http://ppa.launchpad.net jessie Release
Hit http://deb.debian.org jessie Release
100% [3 Packages 558 kB] [Release gpgv 148 kB] [Waiting for headers] [Waiting fErr http://ppa.launchpad.net jessie/main amd64 Packages
Get:4 http://deb.debian.org jessie-updates/main amd64 Packages [17.8 kB]
Err http://ppa.launchpad.net jessie/main amd64 Packages
Get:5 http://deb.debian.org jessie/main amd64 Packages [9063 kB]
Err http://ppa.launchpad.net jessie/main amd64 Packages
Err http://ppa.launchpad.net jessie/main amd64 Packages
Err http://ppa.launchpad.net jessie/main amd64 Packages
 404  Not Found
100% [5 Packages 9063 kB]Fetched 9847 kB in 1s (7436 kB/s)
W: Size of file /var/lib/apt/lists/security.debian.org_dists_jessie_updates_main_binary-amd64_Packages.gz is not what the server reported 558365 558382
W: Failed to fetch http://ppa.launchpad.net/duggan/bats/ubuntu/dists/jessie/main/binary-amd64/Packages  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
Exited with code 100

Question

How do you use bats on circleci?

edouard-lopez commented 7 years ago

Solved using bpkg:

    - run: curl -Lo- "https://raw.githubusercontent.com/bpkg/bpkg/master/setup.sh" | sudo bash
    - run: bpkg install -g sstephenson/bats