Git svn does not use the svn credentials

China☆狼群 提交于 2019-12-19 09:26:38

问题


I try to clone a path from our svn repository. The repository is secured with passwords.

I have found some subversion directories on my Windows 10 System and created symlinks for them. So it is only one directory.

I opened the git-bash and started the command

svn checkout --username myuser --password mypassword svn://myserver/myrepository/myproject/trunk

SVN created in the auth/svn.simple directory a file with my credentials. The file starts with

K 8
passtype
V 8
wincrypt
K 8
password
...

The following command is now succesful:

svn update trunk

Now I want to use git-svn:

git svn clone svn://myserver/myrepository/myproject --username myuser

But all I get is the following response:

Initialized empty Git repository in D:/mylocalprojectpath/.git/
W: Item is not readable: Item is not readable at /mingw64/share/perl5/site_perl/Git/SVN.pm line 153.
**Error from SVN, (220001): Item is not readable: Item is not readable**

All I have found about this error says that this is an authentication problem. So it seems to me that git svn does not use the stored credentials of svn.

What am I doing wrong? Some suggestions?


回答1:


The reason why git-svn does not use SVN is that it use the credentials stored at C:\Users\XXXX.subversion, which is created by git-svn but not SVN. In my case, Error from SVN, (220001): Item is not readable: Item is not readable also occur.

The solution is to move the credentials from SVN to git-svn:

  1. Use SVN to check out from server. Remember to save auth. This can create credentials for SVN. The files are stored at C:\Users\XXXXX\AppData\Roaming\Subversion.
  2. Remove the .subversion folder which is under user directory C:\Users\XXXXX if it exists. And then copy the C:\Users\XXXXX\AppData\Roaming\Subversion folder to C:\Users\XXXXX.
  3. Then rename it to .subversion. Since the name starts with a ".", you may need to rename it in cmd console with "rename" command.
  4. Finally, you can use git-svn clone.


来源:https://stackoverflow.com/questions/42549463/git-svn-does-not-use-the-svn-credentials

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