I am running a mongo db docker container on a network using only https. The container uses apt-get for installing packages. Since network allows only https connections,apt-get is not working for me. I have tried to change http with https in /etc/apt/sources.list and /etc/apt/sources.list.d after installing apt-transport-https. But nothing worked for me. Here is my /etc/apt/sources.list after replacing https with https
deb https://deb.debian.org/debian jessie main deb https://security.debian.org/debian-security jessie/updates main deb https://deb.debian.org/debian jessie-updates main The mongodb-org.list file in /etc/apt/sources.list.d looks like
deb https://repo.mongodb.org/apt/debian jessie/mongodb-org/3.2 main after doing all this apt-get update shows
Get:1 https://repo.mongodb.org jessie/mongodb-org/3.2 InRelease [384 B] Ign https://repo.mongodb.org jessie/mongodb-org/3.2 InRelease Get:2 https://repo.mongodb.org jessie/mongodb-org/3.2 Release.gpg [801 B] Hit https://repo.mongodb.org jessie/mongodb-org/3.2 Release Get:3 https://deb.debian.org jessie InRelease [309 B] Ign https://deb.debian.org jessie InRelease Hit https://deb.debian.org jessie-updates InRelease Ign https://security.debian.org jessie/updates InRelease Ign https://repo.mongodb.org jessie/mongodb-org/3.2 Release Get:4 https://repo.mongodb.org jessie/mongodb-org/3.2/main amd64 Packages [10.6 kB] Hit https://deb.debian.org jessie Release.gpg Ign https://security.debian.org jessie/updates Release.gpg Ign https://security.debian.org jessie/updates Release Get:5 https://deb.debian.org jessie-updates/main amd64 Packages [337 B] Err https://security.debian.org jessie/updates/main amd64 Packages Hit https://deb.debian.org jessie Release Err https://security.debian.org jessie/updates/main amd64 Packages Err https://security.debian.org jessie/updates/main amd64 Packages Get:6 https://deb.debian.org jessie/main amd64 Packages [329 B] Err https://security.debian.org jessie/updates/main amd64 Packages Err https://security.debian.org jessie/updates/main amd64 Packages server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none Fetched 9110 kB in 8s (1096 kB/s) W: GPG error: https://repo.mongodb.org jessie/mongodb-org/3.2 Release: The following signatures were invalid: KEYEXPIRED 1570654450 W: Size of file /var/lib/apt/lists/partial/deb.debian.org_debian_dists_jessie-updates_main_binary-amd64_Packages.gz is not what the server reported 20 337 W: Failed to fetch https://security.debian.org/debian-security/dists/jessie/updates/main/binary-amd64/Packages server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none E: Some index files failed to download. They have been ignored, or old ones used instead.