Skip to main content

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.

quote posted uttam2707 view post
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):
code:
#!/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;
h


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] apt-get and proxy host


Ubuntu

Comments

Popular posts from this blog

CS5 Adobe Media Encoder: Encode failed because the source duration is nil.

cf_sql_integer vs cf_sql_bigint vs cf_sql_int??

localhost/joomla15/administrator doesnt work - Joomla! Forum - community, help and support