Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I try to run following command from shell script:
svn checkout http://url/ --username user --password password --non-interactive --no-auth-cache .

It fails always with following error:

svn: OPTIONS of 'http://url/': authorization failed: Could not authenticate to server: rejected Basic challenge (http://url)

Here the call out of my script:
$(svn $command $url $auth --non-interactive --no-auth-cache .)

Running the same command from the terminal works fine.
What is the difference between running from shell script and terminal?

Here some version information:

  • OS: Porteus 1.0 based on Slackware 13.3
  • Subversion: subversion-1.6.16-i486-1
share|improve this question
Are there characters such as & in the URL? You should quote it with single quote ' character. – Keith Aug 25 '11 at 6:51
No nothing like that. The single quote lead into svn: '$url' does not appear to be a URL. – CSchulz Aug 25 '11 at 7:02
Oh... it's a variable. Try double quotes " then. Your question isn't telling us everything... – Keith Aug 25 '11 at 7:23
Makes no difference I had tried it. ;) – CSchulz Aug 25 '11 at 7:26
Well, show us yer codez then. ;-) – Keith Aug 25 '11 at 7:27

Check you are using the same svn binary in each case:

echo $PATH
which svn

And these lines before your svn call in the script and when you try it manually.


Maybe it's proxies. I guess show us the env output?

share|improve this answer
Both outputs are the same. – CSchulz Aug 25 '11 at 8:17
Yes I used the env varible http_proxy, but it doesn't matters because firstly it appears in both environments and secondly the webserver is in the same network and so the proxy isn't needed. Please write the next time a comment because I haven't seen your edit. – CSchulz Aug 26 '11 at 10:32
@H3llGhost - sorry I thought my edited answer would pop up for you. – Douglas Leeder Aug 26 '11 at 18:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.