मेरा अभी भी वही मुद्दा है। ऊपर दिए गए उत्तरों में से कोई भी इसे हल नहीं करता है। मेरे पास ubuntu 16.04 है, और मैं https://docs.docker.com/install/linux/docker-ce/ubuntu/ में वर्णित चरणों का पालन करता हूं।
मुझे संदेह है कि यह एक से संबंधित है apt-get
https बग । द्वारा मुद्रित की जा रही जानकारी apt-get
भ्रामक है।
मुझे लगता है कि Failed to fetch..
इसका अनुवाद प्रकार भी किया जा सकता है:problem accessing resource from within an https connection
मैं इस निष्कर्ष पर कैसे आया:
सबसे पहले मैं एक कॉर्पोरेट प्रॉक्सी के पीछे हूँ इसलिए मैंने निम्नलिखित कॉन्फ़िगरेशन निर्धारित किया है:
/etc/apt/apt.conf
Acquire::http::proxy "http://squidproxy:8080/";
Acquire::https::proxy "http://squidproxy:8080/";
Acquire::ftp::proxy "ftp://squidproxy:8080/";
Acquire::https::CaInfo "/etc/ssl/certs/ca-certificates.pem";
/etc/apt/apt.conf.d/99proxy
Acquire::http::Proxy {
localhost DIRECT;
localhost:9020 DIRECT;
localhost:9021 DIRECT;
};
मैंने विभिन्न परीक्षणों के साथ निम्नलिखित परीक्षण किए sources.list
परीक्षण प्रविष्टि 1:
deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable
sudo apt-get update
W: The repository 'https://download.docker.com/linux/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://download.docker.com/linux/ubuntu/dists/xenial/stable/binary-amd64/Packages
E: Some index files failed to download. They have been ignored, or old ones used instead.
असफलता
परीक्षण प्रविष्टि 2:
deb [arch=amd64] http://localhost:9020/linux/ubuntu xenial stable
/etc/apache2/sites-enabled/apt-proxy.conf
# http to https reverse proxy configuration.
Listen 9020
<VirtualHost *:9020>
SSLProxyEngine On
# pass from squid proxy
ProxyRemote https://download.docker.com/ http://squidproxy:8080
ProxyPass / https://download.docker.com/
ProxyPassReverse / https://download.docker.com/
ErrorLog ${APACHE_LOG_DIR}/apt-proxy-error.log
CustomLog ${APACHE_LOG_DIR}/apt-proxy-access.log combined
</VirtualHost>
sudo apt-get update
Hit:1 ..
Hit:2 ..
...
Hit:7 http://localhost:9020/linux/ubuntu xenial InRelease
Get:8 ...
Fetched 323 kB in 0s (419 kB/s)
Reading package lists... Done
सफलता
परीक्षण प्रविष्टि 3:
deb [arch=amd64] https://localhost:9021/linux/ubuntu xenial stable
/etc/apache2/sites-enabled/apt-proxy.conf
# https to https revere proxy
Listen 9021
<VirtualHost *:9021>
# serve on https
SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
SSLProxyEngine On
# pass from squid proxy
ProxyRemote https://download.docker.com/ http://squidproxy:8080
ProxyPass / https://download.docker.com/
ProxyPassReverse / https://download.docker.com/
ErrorLog ${APACHE_LOG_DIR}/apt-proxy-error.log
CustomLog ${APACHE_LOG_DIR}/apt-proxy-access.log combined
</VirtualHost>
sudo apt-get update
W: The repository 'https://localhost:9021/linux/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://localhost:9021/linux/ubuntu/dists/xenial/stable/binary-amd64/Packages
E: Some index files failed to download. They have been ignored, or old ones used instead.
असफलता
उपरोक्त मामलों में url जिसे apt-get Failed to fetch
और Release
फाइल भी मिलता है , वास्तव में उसी प्रॉक्सी कॉन्फ़िगरेशन से browser
/ wget
/ curl
का उपयोग कर रहे थे ।
तथ्य यह है कि apt-get
केवल HTTP रिवर्स प्रॉक्सी यूआरएल के साथ काम किया है, का अर्थ है कि एक https कनेक्शन के भीतर संसाधनों तक पहुँचने में कुछ समस्या है ।
मुझे नहीं पता कि यह मुद्दा क्या है, लेकिन apt-get
अधिक जानकारीपूर्ण संदेश दिखाना चाहिए ( apt
यह भी कम क्रिया है)।
नोट: तारों का मामला 1 से पता चला कि प्रॉक्सी CONNECT
सफल था, और कोई आरएसटी नहीं भेजा गया था, लेकिन निश्चित रूप से फाइलें नहीं पढ़ी जा सकीं।