Search code examples
svnauthenticationtortoisesvnpasswordsrecovery

Move saved TortoiseSVN authentication to another machine?


Is there a way to move a saved login/password for TortoiseSVN to a network repository from machine to machine? Just got a new machine, know my username but don't recall my login to the repository.

I know TortoiseSVN saves some auth info on the directories at %appdata%\Subversion\auth

Moved over the file I found at svn.simple; I see my user name in it in clear text but the password is encrypted. I also see "wincrypt" in the file so that's the crypto functionality invoked.

Ordinarily I'd just have the SVN admin reset it for me but he is out on vacation until next week as is the other admin for SVN.

I can dive into the source for TortoiseSVN and see how authentication is being accomplished but there's got to be an easier way. I can run Wireshark on the successful authentication from the old machines if that would be useful.


Solution

  • Solved! Turns out it was pretty simple to resolve.

    Wireshark was the answer. Did a capture of the communication between my old machine and the repository host, launched the repo browser from TortoiseSVN. Then I ran "Follow TCP Stream" on the conversation, and found this line:

    Authorization: Basic ZHIzeDppc0F3ZXNvbWU=

    Here's the Powershell script to decode it:
    $basic = "ZHIzeDppc0F3ZXNvbWU="
    [System.Text.Encoding]::ASCII.GetString([System.Convert]::FromBase64String($basic))

    Returns plain text: uname:pwd