Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the cause and solution to SVN: Could not authenticate to server: rejected Basic challenge?

Tags:

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??

like image 371
Lana Miller Avatar asked May 03 '12 23:05

Lana Miller


People also ask

Could not authenticate to Server Rejected Basic challenge?

If the first or second reasons for this error message, "Could Not Authenticate To Server: Rejected Basic Challenge" apply to you, the solution is fairly straightforward. The server will prompt you three times to enter the proper password, cross-check your password, and enter the correct password.

What is SVN authentication?

Windows Authentication is a key feature of VisualSVN Server. This feature is designed for Active Directory domain environments and allows users to access VisualSVN Server with their Windows credentials.


2 Answers

 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.

like image 193
bahrep Avatar answered Oct 24 '22 01:10

bahrep


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

like image 36
Jaap D Avatar answered Oct 24 '22 00:10

Jaap D