apt update: Could not handshake: An unexpected TLS packet was received
Check if the proxy is also set for https. Since curl
is working with https, I assume, that somewhere a https_proxy
variable is set (e.g. ~/.bashrc
). apt
requires a proxy configuration in /etc/apt/apt.conf
or /etc/apt/apt.conf.d/
. You need to specify the proxy for all protocols:
# e.g. in file /etc/apt/apt.conf.d/05proxy
Acquire::http::proxy "http://192.168.0.1:3128/";
Acquire::https::proxy "http://192.168.0.1:3128/";
Acquire::ftp::proxy "http://192.168.0.1:3128/";
Also keep in mind, if the proxy configuration is only set for the sdnc-dev
user, you need sudo -E
to expose the environment to the root user.