git-svn anonymous checkout fails with -s

好久不见. 提交于 2019-12-04 13:54:17

问题


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?


回答1:


I have an idea what this might be related to:

http://subversion.tigris.org/issues/show_bug.cgi?id=3242

If it's not that, then you're likely out of luck... The root of my repository is not publicly accessible...




回答2:


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



来源:https://stackoverflow.com/questions/1493052/git-svn-anonymous-checkout-fails-with-s

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!