24

If you search around the web you will see this question asked a lot but there are no clear answers. Here is my particular case.

I am using Versions SVN client on a mac but I get the same problem when using the command line. I have personal repo credentials to someone else's repo and it is working on my one machine where I set it up 6 months ago.

I copied my .ssh folder from my user directory to a different machine, installed versions on that machine, and set up by login credentials, only it is failing with the following message:

authorization failed: Could not authenticate to server: rejected Basic challenge

The URL for the repo is using https, but i removed the 's' and tried non-secure, same problem. I then deleted my .ssh folder from my other computer, same problem. Someone else said this error is related to SVN trying to use basic auth (http) and failing. This is not much help to me because I have no idea what to do to fix it. My login credentials are good, but this error message is probably one of the least descriptive and worst written that I have dealt with. How do I fid this problem??

0

4 Answers 4

21
 authorization failed: Could not authenticate to server: rejected Basic
 challenge

The error you get means that SVN server (Apache HTTP Server actually) rejects to authenticate you because of invalid credentials. Here are the steps to troubleshoot the error:

  • Do you get the password prompt? Do you get the password prompt 3 times in a row and then see this error?

    If you do: the first troubleshooting step would be to double-check that the entered username and password are correct. Usernames can be case-sensitive!

    The second troubleshooting step is not as obvious as the previous one; you can encounter the problem after changing your AD account's password. Basic authentication fails when password contains non-ASCII symbols (e.g. £, ü, ä, etc.). Shortly speaking Basic auth does not support non-ASCII characters in the password.

  • You do not get the password prompt, it just fails with the error authorization failed: Could not authenticate to server: rejected Basic challenge.

    It makes sense to attempt to authenticate forcing your credentials, e.g. with the command-line:

    svn info --username USERNAME --password PASSWORD --no-auth-cache https://server/svn/repository/

    --username ARG : specify a username ARG

    --password ARG : specify a password ARG

    --no-auth-cache : do not cache authentication tokens

    If you can successfully authenticate with this command-line, you should clear your cached credentials. See SVNBook | Client Credentials for details. However, some GUI clients allow you to clear cache in a couple of clicks.

2
  • I get this error after 3 trials and I checked everything, nothing seems wrong.
    – user4964330
    Commented May 4, 2016 at 11:21
  • Nice descriptive answer, but I am 100% sure in my password, because I used to store my password and svn only fails sometimes. E.g. it works 10 times in a row, then starts to ask me for password and fails all 3 attempts. I re-run the same command (e.g. svn update) and then it works just fine without asking for password... Very wierd and I still have no clue how to deal with this :(
    – RAM237
    Commented Aug 21, 2018 at 8:45
2

In my case, it was a problem with the gnome keyring. I deleted is completely (rm all the files in ..gnome2/keyrings/ [for Debian])

2
  • work like a magic, WTF. why gnome conflict with svn? Thanks for the share, I just use it resolve my problem.
    – Shawn Guo
    Commented Apr 15, 2016 at 1:28
  • You guys probably had gnome-keyring set as your password-stores in your svn settings (usually can be checked in ~/.subversion/config) and since you haven't stored your password in gnome keyring, svn was unable to obtain the password from it ;)
    – RAM237
    Commented Aug 21, 2018 at 8:47
0

one thing that i noticed is that if i select 1.6 version in SVN working Copy Format popup while importing from svn then it doesnt allows me to checkout and throws above error. If i select 1.7 version checkout worked fine.

I m using IntelijIdea 13.1.5

1
  • 2
    just for future reference: I had a similar problem, trying to access 1.8-formatted repository with command-line 1.6 svn client; got "rejected digest challenge" - after upgrading to 1.8 the problem disappeared
    – Miki
    Commented Feb 21, 2015 at 10:50
-3

Best to just use SVN to copy trunk over to tags

svn cp http://plugins.svn.wordpress.org/xxx/trunk http://plugins.svn.wordpress.org/xxx/tags/1.0 -m "tagging 1.0"

That should work just fine if you're having a problem with git svn tag.

1
  • How does this relate to the original question? It does not make any sense in context of authentication and the original error.
    – bahrep
    Commented Jul 29, 2016 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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