记一次 SourceTree 错误

公司使用的 svn 服务器有限制,导致使用 SourceTree 一直获取不下来,因为无法在 SourceTree 中使用用户名密码进行认证,所以导致必须使用 git svn 先获取仓库到本地,然后再用 SourceTree 导入,但是导入后也同样会出现类似下面的错误:

1
2
3
4
5
6
7
8
9
10
11
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree svn fetch
Authentication realm: <https://192.168.1.251:8443> VisualSVN Server
Password for 'jinke.jiang':
Authentication realm: <https://192.168.1.251:8443> VisualSVN Server
Username: Use of uninitialized value in concatenation (.) or string at /Applications/SourceTree.app/Contents/Resources/git_local/lib/perl5/site_perl/Git/SVN/Prompt.pm line 20.
Password for '':
Authentication realm: <https://192.168.1.251:8443> VisualSVN Server
Username: Use of uninitialized value in concatenation (.) or string at /Applications/SourceTree.app/Contents/Resources/git_local/lib/perl5/site_perl/Git/SVN/Prompt.pm line 20.
Password for '':
Can't create session: Unable to connect to a repository at URL 'https://192.168.1.251:8443/svn/jinguanjia_ios': No more credentials or we tried too many times.
Authentication failed at /Applications/SourceTree.app/Contents/Resources/git_local/lib/perl5/site_perl/Git/SVN.pm line 143.

原因是在使用 git svn 时输入的密码也没有进行保存,解决方法:

打开 ~/.subversion/servers ,把最后的

store-passwords = no
store-ssl-client-cert-pp = no
store-plaintext-passwords = no
store-ssl-client-cert-pp-plaintext = no

修改成:

store-passwords = yes
store-ssl-client-cert-pp = yes
store-plaintext-passwords = yes
store-ssl-client-cert-pp-plaintext = yes

然后再使用 git svn 再操作一遍以保存账号密码


参考链接:Can't make svn store password, even though the configuration is set to allow it