0

I am trying to set proxy server using gksudo gedit /etc/apt/apt.conf and trying to add the commands as in 'apt-get' does not work with Proxy

Acquire::http::Proxy "http://user:pass@proxy-host:port/";
Acquire::ftp::Proxy "http://user:pass@proxy-host:port/"; 

When I tried this a message on terminal occurs

/usr/share/themes/Ambiance/gtk-2.0/apps/mate-panel.rc:30: error: invalid string constant "murrine-scrollbar", expected valid string constant
Error copying '/home/dipesh/.Xauthority' to '/tmp/libgksu-FU5d7j': No such file or directory 

with a message on screen

Failed to run gedit '/etc/apt/apt.conf' as user root.
Unable to copy the user's Xauthorization file.

when I manually try to add in apt.conf file, it denies messaging

You do not have the permissions necessary to save the file. Please check that you typed the location correctly and try again.

When I tried this it works

sudo env http_proxy=http://<ip>:<port> apt-get update

But sudo apt-get update or sudo add-apt-repository ppa:webupd8team/sublime-text-3 or

sudo env http_proxy=http://10.7.0.1:8080 apt-repository ppa:webupd8team/sublime-text-3

doesn't works.

I am new to Ubuntu please help!

1 Answer 1

1

try this

# create file:
sudo vim /etc/apt/apt.conf.d/80proxy
# with this inside file
Acquire::http::Proxy "http://user:pass@proxy-host:port/";

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .