LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-12-2008, 01:43 PM   #1
ibkoxls
Member
 
Registered: Jun 2007
Posts: 34

Rep: Reputation: 15
How do I configure cUrl?


Hello everyone,

I didn't add repositories while installing OpenSuse 10.3; now I need to. I've tried to do it through Yast (Yast-->Software Repositories) but I keep getting an error message, e.g.

Unable to create repository from url http:www.packman.unixheads.com
Curl error for http:www.packman.unixheads.com
error message: couldn't resolve host 'packman.unixheads.com'

Apparently Yast (and zypper too, I've found) rely on curl. I connect to the internet on my office LAN via a proxy - one that requires a username/password combination.

I can download stuff from the internet using curl by invoking it from the command line and passing certain parameters (-U and -X I think, not quite sure now).

So, the question is, how do I configure curl to ALWAYS use our proxy to access the internet and supply the username/password combo? (I believe if I configure curl this way, I won't have any issues with using either Yast or zypper to add repositories).

Thanks.
 
Old 03-14-2008, 08:26 AM   #2
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,453

Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
Hi

You can set the environment variable http_proxy and curl will use the proxy.

For example:

export http_proxy=http://proxyserver.example.org:8123/

I don't know much about Suse, so I don't know the proper place to put it, but I think adding it to /etc/profile will do.

Edit:
For username and password:
export http_proxy=http://username:password@proxyserver.example.org:8123/

Last edited by Guttorm; 03-14-2008 at 08:31 AM.
 
Old 03-26-2008, 04:04 AM   #3
ibkoxls
Member
 
Registered: Jun 2007
Posts: 34

Original Poster
Rep: Reputation: 15
Hi Guttorm,

I created a config file for curl and put the http_export statement as you suggested. I named the file .curlrc and saved it in /etc/skel (I discovered that that's where you keep such files in OpenSuse) yet there's still no change - I can't automatically use the proxy with curl.

Thanks for the advice, I appreciate it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
curl help furqan_sindhu Programming 5 09-13-2007 05:14 AM
cURL ballistic509 Debian 2 06-11-2006 01:06 PM
Using Curl command backpackingbiker Ubuntu 1 06-21-2005 04:16 PM
Curl under PHP ttxmika Slackware 11 05-31-2005 11:24 AM
Curl Conflict christer Linux - Software 0 10-13-2003 11:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration