Thread: apt-get and proxy host
how configure apt-get such ask authentication (user name , password) each time while accessing internet via proxy host, sudo command. don't want username , password saved apt-get in apt-get configuration file.
i can't give direct answer this, i'd use (from couple of years back) following script reasonably safe (i think):
hcode:#!/bin/bash echo -n "proxy password: "; read -es password; echo; export http_proxy="http://user_name:$password@proxy:port/"; if !(sudo apt-get update) echo "failure: apt-get update"; fi sleep 2 echo -n "run 'apt-get upgrade'? (y/n): "; read -e response; if [ "$response" = "y" ] || [ "$response" = "y" ] if !(sudo apt-get upgrade) echo "failure: apt-get upgrade"; fi elif [ "$response" != "n" ] || [ "$response" != "n" ] echo "$response: invalid input."; fi unset http_proxy; exit 0;
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] apt-get and proxy host
Ubuntu
Comments
Post a Comment