2

I just tried importing an svn-repo to a git repo, but I'm facing a bit of a problem. After starting to import the first repo with svn2git http://path.to.repo.com/repos/a/ --username abc --verbose i thought "this is taking too long". And since at this time it's only for testing purposes, I decided to CTRL-C and import a smaller repository first. So I typed in svn2g http://path.to.repoe.com/repos/b/ --username xyz --verbose.

That gave me this

URL access forbidden for unknown reason: access to 'http://svn.path.to.repo.com/repos/b/' forbidden at /usr/lib/perl5/vendor_perl/5.10.0/Git/SVN.pm line 303

I'm sure, the username is the correct one, so I took a look at the svn_access_log and there I saw, that everytime I run the second command with --username xyz this pops up in my svn_access_log:

{arbitrary IP} - - [31/Oct/2013:08:48:15 +0100] "OPTIONS /repos/b HTTP/1.1" 401 401
{arbitrary IP} - abc [31/Oct/2013:08:48:15 +0100] "OPTIONS /repos/b HTTP/1.1" 403 211

How come, svn2git uses the wrong username here, even though I provide it?

UPDATE: It worked, after I ran svn co http://path.to.repo.com/repos/b/ --username xyz. Can anyone explain that to me?

Vince
  • 1,517
  • 2
  • 18
  • 43

1 Answers1

3

Since this works:

svn co http://path.to.repo.com/repos/b/ --username xyz.
svn2git http://path.to.repo.com/repos/a/ --username abc --verbose

That should means the svn co has cached the credentials on the svn side, and the svn2git command has reused that successfully.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • `svn2git --help` states, that the order is first URL and then options, that's why I didn't try that. Somehow it seems to work now for me...Weird. – Vince Oct 31 '13 at 10:27
  • 1
    @Vince did you try to passe the username in the url directly? `svn2git http://abc@path.to.repo.com/repos/a/` – VonC Oct 31 '13 at 10:29
  • No, I did not. As it's working now, I can't get it back to a state, where it doesn't work, so I can't test if that makes a difference... – Vince Nov 01 '13 at 07:24
  • @Vince maybe your `svn co` did cache the credentials on the svn side: I have rewritten the answer to reflect that. – VonC Nov 01 '13 at 07:54