{"id":2433,"date":"2019-07-19T22:12:58","date_gmt":"2019-07-19T13:12:58","guid":{"rendered":"http:\/\/matoken.org\/blog\/?p=2433"},"modified":"2019-07-19T22:20:34","modified_gmt":"2019-07-19T13:20:34","slug":"direct-access-to-https-repository-with-apt-cacher-ng","status":"publish","type":"post","link":"https:\/\/matoken.org\/blog\/2019\/07\/19\/direct-access-to-https-repository-with-apt-cacher-ng\/","title":{"rendered":"apt-cacher-ng \u3067 https \u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u76f4\u63a5\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3088\u3046\u306b\u3059\u308b"},"content":{"rendered":"<div class=\"paragraph\">\n<p>apt-cacher-ng \u3067\u5404\u7a2e\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3057\u3066\u3044\u308b\u306e\u3067\u3059\u304c\uff0chttps \u306e\u5834\u5408\u30a8\u30e9\u30fc\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"title\">error message<\/div>\n<div class=\"content\">\n<pre>$ sudo apt update\r\nErr:1 https:\/\/updates.signal.org\/desktop\/apt xenial InRelease              Reading from proxy failed - read (115: Operation now in progress) [IP: 192.168.1.102 3142]                                                      Err:2 https:\/\/deb.opera.com\/opera-stable stable InRelease\r\n  Reading from proxy failed - read (115: Operation now in progress) [IP: 192.168.1.102 3142]\r\n :\r\nW: Failed to fetch https:\/\/deb.opera.com\/opera-stable\/dists\/stable\/InRelease  Reading from proxy failed - read (115: Operation now in progress) [IP: 192.168.1.102 3142]\r\nW: Failed to fetch https:\/\/updates.signal.org\/desktop\/apt\/dists\/xenial\/InRelease  Reading from proxy failed - read (115: Operation now in progress) [IP: 192.168.1.102 3142]\r\nW: Some index files failed to download. They have been ignored, or old ones used instead.<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>Debian wiki \u306b\u89e3\u6c7a\u65b9\u6cd5\u304c\u8f09\u3063\u3066\u3044\u307e\u3057\u305f\uff0ehttps \u306e\u5834\u5408\u306f\u30ad\u30e3\u30c3\u30b7\u30e5\u305b\u305a\u306b\u76f4\u63a5\u898b\u306b\u884c\u304b\u305b\u308b\u8a2d\u5b9a\u304c\u51fa\u6765\u308b\u3088\u3046\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"quoteblock\">\n<div class=\"title\"><a href=\"https:\/\/wiki.debian.org\/AptCacherNg#HTTPS_repositories\">AptCacherNg &#8211; Debian Wiki<\/a><\/div>\n<blockquote>\n<div class=\"paragraph\">\n<p>HTTPS repositories<br \/>\napt-cacher-ng will obviously fail to serve HTTPS repositories. There are many solutions upstream but I have found the simplest solution to be to simply tunnel HTTPS connections directly on the proxy, by putting this in \/etc\/apt-cacher-ng\/acng.conf:<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>PassThroughPattern: .*<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>This is, as far as I can tell, the only way to avoid doing a special configuration on the clients for HTTPS repositories. The downside is that HTTPS content is not cached.<\/p>\n<\/div>\n<\/blockquote>\n<\/div>\n<div class=\"paragraph\">\n<p><code>\/etc\/apt-cacher-ng\/acng.conf<\/code> \u306b <code>PassThroughPattern: .*<\/code> \u3092\u8a2d\u5b9a\u3057\u3066\u30c7\u30fc\u30e2\u30f3\u3092\u518d\u8d77\u52d5\u3059\u308b\u3053\u3068\u3067\u76f4\u63a5\u30a2\u30af\u30bb\u30b9\u3057\u3066\u30a8\u30e9\u30fc\u3092\u51fa\u3055\u306a\u304f\u306a\u308a\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>\u4ee5\u4e0b\u306e\u30da\u30fc\u30b8\u306e\u3088\u3046\u306b source.list \u3092\u66f8\u304d\u63db\u3048\u3066https \u3067\u3042\u3063\u3066\u3082\u30ad\u30e3\u30c3\u30b7\u30e5\u3059\u308b\u65b9\u6cd5\u3082\u3042\u308b\u3088\u3046\u3067\u3059\u304c\u4eca\u56de\u306f\u306a\u3057\u3067\uff0e<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>\n<p><a href=\"https:\/\/www.unix-ag.uni-kl.de\/~bloch\/acng\/html\/howtos.html#ssluse\">HOWTOs and FAQ<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"title\">apt-cacher-ng\u74b0\u5883<\/div>\n<div class=\"content\">\n<pre>$ dpkg-query -W apt-cacher-ng\r\napt-cacher-ng   3.1-1build1\r\n$ hostnamectl | egrep 'Operating System|Architecture'\r\n  Operating System: Ubuntu 18.04.2 LTS\r\n      Architecture: x86-64<\/pre>\n<\/div>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"title\">apt\u5b9f\u884c\u74b0\u5883<\/div>\n<div class=\"content\">\n<pre>$ dpkg-query -W apt\r\napt     1.8.2\r\n$ hostnamectl | egrep 'Operating System|Architecture'\r\n  Operating System: Debian GNU\/Linux bullseye\/sid\r\n      Architecture: x86-64<\/pre>\n<\/div>\n<\/div>\n<p><iframe style=\"width:120px;height:240px;\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=matokensmeme-22&#038;language=ja_JP&#038;o=9&#038;p=8&#038;l=as4&#038;m=amazon&#038;f=ifr&#038;ref=as_ss_li_til&#038;asins=B07SSGTP7W&#038;linkId=cd03a24bb526a8c74e4770e09f511707\"><\/iframe><iframe style=\"width:120px;height:240px;\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=matokensmeme-22&#038;language=ja_JP&#038;o=9&#038;p=8&#038;l=as4&#038;m=amazon&#038;f=ifr&#038;ref=as_ss_li_til&#038;asins=B00TQMFOCW&#038;linkId=a5ae134a3713bb3422bdbdf509f9d8c7\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>apt-cacher-ng \u3067\u5404\u7a2e\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3057\u3066\u3044\u308b\u306e\u3067\u3059\u304c\uff0chttps \u306e\u5834\u5408\u30a8\u30e9\u30fc\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\uff0e error message $ sudo apt update Err:1 https:\/\/upda [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"webmentions_disabled_pings":false,"webmentions_disabled":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[372,6,63],"tags":[470,471],"class_list":["post-2433","post","type-post","status-publish","format-standard","hentry","category-bionic-beaver18-04lts","category-linux","category-ubuntu","tag-apt-cacher-ng","tag-https"],"_links":{"self":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/2433","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/comments?post=2433"}],"version-history":[{"count":0,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/2433\/revisions"}],"wp:attachment":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/media?parent=2433"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/categories?post=2433"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/tags?post=2433"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}