Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages 404 Not Found

[The relevant part of] my bitbucket-pipeline looks like this:

  - step:
      image: python:3.5.1
      name: upload to s3
      script:
        - export S3_BUCKET="elasticbeanstalk-us-east-1-122232355432"
        - export VERSION_LABEL=$(cat VERSION_LABEL)
        - apt-get update # required to install zip
        - apt-get install -y zip # required for packaging up the application
        - pip install boto3==1.3.0 # required for upload_to_s3.py
        - zip --exclude=*.git* -r /tmp/artifact.zip . # package up the application for deployment
        - python upload_to_s3.py # run the deployment script

When I run it in Bitbucket however, I get the following error:

+ apt-get update
Get:1 http://security.debian.org jessie/updates InRelease [44.9 kB]
Ign http://httpredir.debian.org jessie InRelease
Ign http://httpredir.debian.org jessie-updates InRelease
Get:2 http://httpredir.debian.org jessie Release.gpg [2420 B]
Ign http://httpredir.debian.org jessie-updates Release.gpg
Get:3 http://httpredir.debian.org jessie Release [148 kB]
Ign http://httpredir.debian.org jessie-updates Release
Err http://httpredir.debian.org jessie-updates/main amd64 Packages

Err http://httpredir.debian.org jessie-updates/main amd64 Packages

Err http://httpredir.debian.org jessie-updates/main amd64 Packages

Err http://httpredir.debian.org jessie-updates/main amd64 Packages

Err http://httpredir.debian.org jessie-updates/main amd64 Packages
  404  Not Found
Get:4 http://security.debian.org jessie/updates/main amd64 Packages [824 kB]
Get:5 http://httpredir.debian.org jessie/main amd64 Packages [9098 kB]
Fetched 10.1 MB in 7s (1394 kB/s)
W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.

It seems the image I am using is no longer good, perhaps? How can I solve this issue, or at least find another "image" that contains what I need? I originally copied this pipeline from the Bitbucket documentation example, so I don't know how to find and replace the image with something that works.

Also, is there some way for me to test locally so I don't have to commit/push each time I want to test it?

like image 338
CodyBugstein Avatar asked Mar 27 '19 13:03

CodyBugstein


1 Answers

I faced the same issue today

Solved by updating docker image version from python:3.5.1 to python:3.5.7 or python:3.7.2

Reference:https://community.atlassian.com/t5/Bitbucket-Pipelines-articles/Bitbucket-Pipelines-Apt-get-update-returning-404/ba-p/1042290#M54

like image 87
Raja Avatar answered Oct 19 '22 09:10

Raja