I'm working on a debian:9 image pulled from Docker Hub. When I ran apt update
or apt-get update
, I got the following error messages:
Ign:1 http://security.debian.org/debian-security stretch/updates InRelease
Ign:2 http://deb.debian.org/debian stretch InRelease
Err:3 http://security.debian.org/debian-security stretch/updates Release
400 Bad request: request method denied
Ign:4 http://deb.debian.org/debian stretch-updates InRelease
Err:5 http://deb.debian.org/debian stretch Release
400 Bad request: request method denied
Err:6 http://deb.debian.org/debian stretch-updates Release
400 Bad request: request method denied
Reading package lists... Done
E: The repository 'http://security.debian.org/debian-security stretch/updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://deb.debian.org/debian stretch Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://deb.debian.org/debian stretch-updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
My sources.list
file looks like this (official example from Debian Wiki):
deb http://deb.debian.org/debian stretch main
deb-src http://deb.debian.org/debian stretch main
deb http://deb.debian.org/debian stretch-updates main
deb-src http://deb.debian.org/debian stretch-updates main
deb http://security.debian.org stretch/updates main
deb-src http://security.debian.org stretch/updates main
I also tried other releases, but got the same error. Does anyone have a clue what might cause the problem? Many thanks!
EDIT:
Thanks to GracefulRestart, I finally solved it by manually setting the network proxy for the Debian image in Dockerfile before I do apt update
.
Although the question is marked as duplicate, it has nothing to do with Debian: The repository does not have a Release file, because it was 400 error and the sources.list
file was actually correct.
debian:latest
that you do. I am not able to replicate your problem, are you running behind some proxy that would modify your requests in some way? – GracefulRestart Apr 17 '18 at 18:11