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?
# Clone a repo with standard SVN directory layout (like git clone): git svn clone http://svn.example.com/project --stdlayout --prefix svn/ # Or, if the repo uses a non-standard directory layout: git svn clone http://svn.example.com/project -T tr -b branch -t tag --prefix svn/ # View all branches and tags you have ...
git-svn is a specialized tool for Git users to interact with Git repositories. It works by providing a Git frontend to an SVN backend. With git-svn, you use Git commands on the local repository, so it's just like using normal Git. However, behind the scenes, the relevant SVN commands are sent to the server.
You can checkout a git repository but you can't do most of other operations. You can setup tortoise git which provides same interface for Git although the commands are different.
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>/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With