6

I have been using the proxy hproxy.iitm.ac.in. I've moved out now and want to change config to no proxy. On using:

curl -L https://get.rvm.io | bash -s stable --ruby --autolibs=enable --auto-dotfiles

I'm prompted with:

curl: (5) Couldn't resolve proxy 'hproxy.iitm.ac.in'

I'm not very proficient with Ubuntu (using 12.10). Please, could someone tell me what configurations I need to change to be able to use curl?

EDIT : I'm able to browse internet. I have also changed my ~/.bashrc to show:

export http_proxy="";
export https_proxy="";
export ftp_proxy="";

But it didnt help

Thanks.

4
  • Just go to wherever you set the proxy before, and unset it. Do you remember? Click on the gears icon at the top right > System Settings > Network > Proxy, and see if the proxy is set. Let us know if you can already browse the internet normally, but curl still gives you the proxy error. Also, what is the output of env | grep -i proxy?
    – Alaa Ali
    Sep 19, 2013 at 7:37
  • @Alaa : Yeah i've already changed that. but still getting the prompt. I'm able to browse internet.
    – naka
    Sep 19, 2013 at 7:39
  • @Alaa : env | grep -i proxy givea: NO_PROXY=localhost,127.0.0.0/8 http_proxy=roll_num:[email protected]:3128 ftp_proxy=roll_num:[email protected]:port UBUNTU_MENUPROXY=libappmenu.so https_proxy=roll_num:[email protected]:port no_proxy=localhost,127.0.0.0/8
    – naka
    Sep 19, 2013 at 7:42
  • i faced this when i was trying curl with option -xget instead of -XGET. silly me :/ Mar 17, 2020 at 6:06

3 Answers 3

10

From the comments and your output of env, you still have some proxy variables set. Execute the following commands to unset them:

unset http_proxy
unset ftp_proxy
unset https_proxy

Double check that they've been removed by:

env | grep -i proxy

Now try your curl command.

0
5

You can temporarily bypass the proxy by using the --noproxy option, e.g.

curl -L https://get.rvm.io --noproxy | bash -s stable --ruby --autolibs=enable --auto-dotfiles

You may need to remove proxy settings in ~/.bashrc or ~/.profile or system wide(/etc/profile, /etc/bash.bashrc etc...). Also take a look at ~/.curlrc.

NOTE: if you are using GNOME Desktop Environment, you also need to unset the proxy in System Settings - Network.

3
  • He's asking how to remove the proxy, not to temporarily bypass it.
    – Alaa Ali
    Sep 19, 2013 at 7:38
  • I tried the command. I'm getting "curl: option --noproxy: requires parameter curl: try 'curl --help' or 'curl --manual' for more information"
    – naka
    Sep 19, 2013 at 7:45
  • Terry : I've changed my ~/.bashrac file to: export http_proxy=""; export https_proxy=""; export ftp_proxy=""; But it didnt help. I'm getting the same thing
    – naka
    Sep 19, 2013 at 7:56
0

Open ~/.bashrc add these lines to unset variables.

export http_proxy="";
export https_proxy="";
export ftp_proxy="";

Then either logout and login from terminal or source .bashrc.

You must log in to answer this question.

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