Apt-get update with an @ in password error
I want to update ubuntu 11.04 throught apt-get
.
So I added the following lines in apt.conf
export http_proxy=http://username:[email protected]:port/
export ftp_proxy=http://username:[email protected]/
export http_proxy=http://deepak:Deepak@[email protected]:3128
My question is: how do I insert special characters to a username or password?
For instance: my password for proxy is Deepak@123 and it is getting an error.
Solution 1:
You need to escape
special characters. So place a \
in front of the @
like so:
export http_proxy=http://deepak:Deepak\@[email protected]:3128
Alernatively you can also use %40
.
Solution 2:
Click on
- Dash home
- Search for System Settings
- Select Network
- Select Network Proxy
- Select Manual method
- Set you proxy and port
Kudos You are Done if you set right
Solution 3:
If your password or username contains @
you can percent-encode (also referred as URL encoding) it as %40
in the proxy url. For more special characters see here