[Bug 2017806] Re: do-release-upgrade can not use apt socks5h proxy settings.

Changbin Du 2017806 at bugs.launchpad.net
Fri Mar 15 06:57:51 UTC 2024


First, enable debug logs:
$ DEBUG_UPDATE_MANAGER=1 do-release-upgrade
...
result of meta-release download: '<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1131)>'
...

So in my case, the connection failed due to the certification of the
proxy. Then change /usr/bin/do-release-upgrade to ignore this check.
Insert this code at the beginning of /usr/bin/do-release-upgrade file
but after the '__future__' line:


from __future__ import print_function

import ssl
try:
    _create_unverified_https_context = ssl._create_unverified_context
except AttributeError:
    pass
else:
    ssl._create_default_https_context = _create_unverified_https_context


ok, now it works!

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubuntu-release-upgrader in
Ubuntu.
https://bugs.launchpad.net/bugs/2017806

Title:
  do-release-upgrade can not use apt socks5h proxy settings.

Status in ubuntu-release-upgrader package in Ubuntu:
  New

Bug description:
  apt is configured to use socks5 proxy (dante):

  $ cat /etc/apt/apt.conf.d/50socks
  Acquire::http::proxy "socks5h://192.168.3.100:1080";

  apt works without problem, but do-release-upgrade fails:

  $ do-release-upgrade 
  proxy 'socks5h://192.168.3.100:1080' looks invalid
  Checking for a new Ubuntu release
  Failed to connect to https://changelogs.ubuntu.com/meta-release-lts. Check your Internet connection or proxy settings

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/2017806/+subscriptions




More information about the foundations-bugs mailing list