[Yum-devel] enable yum to pass http data to repository

Bryan Mills bryan at mills1.net
Mon Nov 21 20:00:07 UTC 2005


seth vidal wrote:

>On Sat, 2005-11-19 at 09:34 -0500, Bryan Mills wrote:
>  
>
>>Scott Russell wrote:
>>
>>    
>>
>>>Gotta chime in here and say that I would love to see userid and 
>>>password config options for yum repos. That said, the above while it 
>>>works is less than ideal. The idea of storing a password in the yum 
>>>config file isn't the best practice.
>>>
>>>      
>>>
>>I tend to agree.  I'll brainstorm a bit.  I can only think of two basic 
>>ways you might authenticate against a repository:
>>1) http authentication
>>2) http post or get variables
>>
>>In both cases you have the need to pass at most three variables 
>>(username,password,domain).  So what if you could set the following 
>>config parameters.
>>
>>[testrepo]
>>name=Test Repository
>>baseurl=http://foo/bar
>>authentication=http_post
>>username=bryan
>>http_var_username=my_username_field_name
>>http_var_password=my_password_field_name
>>
>>HTTP authentication would be similar but you wouldn't need 
>>http_var_username/password.
>>
>>Then as a user you could either put the password in the config file or 
>>yum could prompt you for it.  Of course this doesn't work for mirror 
>>lists (just a single base url).
>>
>>    
>>
>
>how about you just use the $YUM# variables
>
>and store them in the shell environment
>
>YUM0=myusername YUM1=mypassword yum install foo
>
>and in your yum.conf have
>
>baseurl=http://$YUM0:$YUM1/url/
>  
>
The problem with this is that its hard to determine what is a valid url 
and what isn't?  In theory I could have a username/password $YUM0/$YUM1.

-bryan



More information about the Yum-devel mailing list