7

In this way I can clone a SVN repository:

svn co svn+ssh://<username>@<url>/var/lib/svn/<repository_name> /var/www/<repository_name>

It starts to create the expected files under /var/www/<repository_name>

I've installed the git svn package, and I tried to clone this SVN repository using GIT:

git svn clone svn+ssh://<username>@<url>/var/lib/svn/<repository_name> /var/www/<repository_name>

It gives the following error message and it doesn't download anything:

svn-remote.svn.url already set: ssh://<username>@<url>/var/lib/svn/<repository_name>
wanted to set to: <username>@<url>/var/lib/svn/<repository_name>

I've also tried:

git svn clone <username>@<url>/var/lib/svn/<repository_name> /var/www/<repository_name>

Which gives the same error message:

svn-remote.svn.url already set: ssh://<username>@<url>/var/lib/svn/<repository_name>
wanted to set to: <username>@<url>/var/lib/svn/<repository_name>

Also tried:

git svn clone ssh://<username>@<url>/var/lib/svn/<repository_name> /var/www/<repository_name>

And it gives the following error message:

Initialized empty Git repository in /var/www/<repository_name>/.git/
Bad URL passed to RA layer: Unrecognized URL scheme for  'ssh://<username>@<url>/lib/svn/<repository_name>' at /usr/lib/git-core/git-svn line 2299

Any idea of what I might be doing wrong?

2
  • 1
    have you tried cloning to a different directory? Commented Apr 29, 2013 at 15:16
  • What version of Git are you using? And on which OS? Commented Apr 30, 2013 at 9:49

3 Answers 3

3

It seems that the problem was related to permissions in the folder, I've tried git svn clone in another folder in my Home directory instead of /var/www and it worked like a charm.

Here the complete command I've used:

git svn clone svn+ssh://<svn_username>@<url>/var/lib/svn/<repository_name> /home/<my_user>/<repository_name>/
Sign up to request clarification or add additional context in comments.

Comments

1

I also used git svn clone -s to get the svn commit comments too.

Comments

0

I also got these issues but by not specifiying a target directory:

sudo git svn clone svn+ssh://<username>@<host>.net/var/svn/<project>

Should be simply:

sudo git svn clone svn+ssh://<username>@<host>.net/var/svn/<project> .

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.