rug can not add a repo when the password contains special characters

  • 7008612
  • 19-May-2011
  • 27-Apr-2012


SUSE Linux Enterprise Desktop 10 Service Pack 3
SUSE Linux Enterprise Server 10 Service Pack 4


Note: This applies only to http repositories and NOT to the Novell Customer Center.


A site internal repository requires basic http authentication

User: foobar
password: s$cret?

This would end in:

rug sa -t YUM "http://foobar:s$cret?" wawa_foobar

Adding YUM service http://foobar:s$cret?         0% 

ERROR: Could not add 'http://foobar:s$cret?': Download
failed: (http://foobar:s$cret/?
Error: NameResolutionFailure

The hostname is resolvable, though, the errormessage is a bit misleading.


Some of the special characters in this password are reserved and and must not be used in a URI, here it's "$" and "?".

RFC2369 describes allowed and reserverd characters.

3.2.2. Server-based Naming Authority

for further information. In order to use strong passwords, these characters have to be escaped to pass through to the server.
The example's password: s$cret? would translate to:


and using the escaped characters in the url finally works:

rug sa -t YUM "" wawa_foobar

Additional Information

Note: rug uses HTTP authentication mechanisms to send user and password to the remote server.
Using "Basic-Auth", these are transmitted as plaintext and can be read by any packet sniffer.
Make sure to use authentication methods that are not liable to be broken that easy.

Feedback service temporarily unavailable. For content questions or problems, please contact Support.