Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git-svn anonymous checkout fails with -s

I'm trying to use git to clone an svn repository with std layout (using the -s option). The repository uses https anonymously (the repository is at https://secure.simplistix.com/svn/xlwt/). I can check the repository out fine using svn, but with git-svn I get password prompts and then cannot check out (I don't have an account for this repository):

Authentication realm:  Simplistix Subversion Server
Password for 'davidf': 
Authentication realm:  Simplistix Subversion Server
Username: 
Password for '': 
Authentication realm:  Simplistix Subversion Server
Username: 
Password for '': 
W: Ignoring error from SVN, path probably does not exist: (160013): Filesystem has no item: '/svn/!svn/bc/100/xlwt' path not found
W: Do not be alarmed at the above message git-svn is just searching aggressively for old history.
This may take a while on large repositories

The resulting repository is entirely empty

git-svn seems to assume that if the repository starts with https, authentication is required. Is there a way to work around this?

like image 447
David Fraser Avatar asked Oct 28 '25 09:10

David Fraser


1 Answers

The reason is probably that the root of the SVN repository is not accessible to anonymous users.

From git help svn:

When tracking multiple directories (using --stdlayout, --branches, or --tags options), git svn will attempt to connect to the root (or highest allowed level) of the Subversion repository. This default allows better tracking of history if entire projects are moved within a repository, but may cause issues on repositories where read access restrictions are in place.

Since you’re using the -s option (shorthand for --stdlayout), this will affect you.

To prevent git svn from attempting to connect to the root of the repository, add the option --no-minimize-url to the command line.

See also: git help svn

like image 50
Daniel Cassidy Avatar answered Oct 30 '25 11:10

Daniel Cassidy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!