Android Studio 无法通过 SVN 进行身份验证

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21323421/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 04:21:44  来源:igfitidea点击:

Android Studio can't authenticate with SVN

androidsvnintellij-ideatortoisesvnandroid-studio

提问by Tai Dao

I'm new in Android Studio. I'm trying to import my project and work with the built-in svn of android studio.

我是 Android Studio 的新手。我正在尝试导入我的项目并使用 android studio 的内置 svn。

When I import the project to android studio, it works fine but the svn of android studio can't authenticate when I update, commit...

当我将项目导入到 android studio 时,它工作正常,但是当我更新、提交时,android studio 的 svn 无法进行身份验证...

The authentication dialog re-appears repeatedly.

身份验证对话框反复重新出现。

What I did:

我做了什么:

  1. Import project folder from svn server using TortoiseSVN

  2. Import project to eclipse and export it as Gradle(Because project on SVN is eclipse project)

  3. Import that gradle project into Android Studio
  1. 使用TortoiseSVN从 svn 服务器导入项目文件夹

  2. 将项目导入eclipse并导出为Gradle(因为SVN上的项目是eclipse项目)

  3. 将该 gradle 项目导入Android Studio

My SVN server is 'svn+ssh' connect. When I'm trying to update or commit, Android studio can't authenticate.

我的 SVN 服务器是 'svn+ssh' 连接。当我尝试更新或提交时,Android Studio 无法进行身份验证。

Error:

错误:

svn: E204899: E170012: When using svn+ssh:// URLs, keep in mind that the --username and --password options are ignored because authentication is performed by SSH, not Subversion
svn: E170012: Unable to connect to a repository at URL 'svn+ssh://zuranai.arx-project.com/opt/SVN1.zap_dev/trunk/android'
svn: E170012: Can't create tunnel
svn: E720002: Can't create tunnel: The system cannot find the file specified.

What's wrong with my android studio? Any advice?

我的安卓工作室出了什么问题?有什么建议吗?

Edited:
I can't commit, update but still can revert.

编辑:
我无法提交,更新但仍然可以恢复。

enter image description here

在此处输入图片说明

回答by jhlee.8804

I had same problem, but found a solution.

我有同样的问题,但找到了解决方案。

  1. Go to 'Android Studio > Preferences > Version Control > Subversion'
  2. Uncheck follow two items
    • Use command line client
    • Use system default Subversion configuration directory
  1. 转到“Android Studio > 首选项 > 版本控制 > Subversion”
  2. 取消选中以下两项
    • 使用命令行客户端
    • 使用系统默认的 Subversion 配置目录

It will now work correctly.

它现在可以正常工作。

回答by tsingroo

I also have this problem. Here is how i solve it: On the "File" menu,click "Invalidate Cashes/Restart..."

我也有这个问题。这是我解决它的方法:在“文件”菜单上,单击“使现金无效/重新启动...”

then,the problem solved!

那么,问题解决了!

回答by pyus13

Please have a look on issue reported in Intellij Idea with some workarounds in reply if it helps you

如果对您有帮助,请查看 Intellij Idea 中报告的问题,并提供一些解决方法作为回复

http://youtrack.jetbrains.com/issue/IDEA-26844(Srinivas Reply)

http://youtrack.jetbrains.com/issue/IDEA-26844(斯里尼瓦斯回复)

and

http://youtrack.jetbrains.com/issue/IDEA-81294(Irina Chernushina (JetBrains))

http://youtrack.jetbrains.com/issue/IDEA-81294(Irina Chernushina (JetBrains))

you need to set your configuration info in SVN tunnel config file(~/.subversion/config) kssh = /your/path/to/ssh

in tunnel section.example mine looks like : kssh = /usr/bin/ssh

Remember you need to point your IDE to use subversion config file in the subversion options or change it in ~/.subversion_IDEA/config file

您需要在 SVN 隧道配置文件(~/.subversion/config)中设置您的配置信息 kssh = /your/path/to/ssh

在隧道 section.example 我的看起来像:kssh = /usr/bin/ssh

请记住,您需要将 IDE 指向在 subversion 选项中使用 subversion 配置文件或在 ~/.subversion_IDEA/config 文件中更改它

回答by Virtual

Maybe an other solution : in my case, the SVN SSL certificate is a self-signed, so AndroidStudio won't make checkout until the certificate is accepted. It seems that AndroidStudio doesn't ask what the user want to do.

也许是其他解决方案:在我的情况下,SVN SSL 证书是自签名的,因此在接受证书之前,AndroidStudio 不会进行结帐。AndroidStudio 似乎没有问用户想要做什么。

The solution was to make a checkout with tortoiseSVN (do it with svn command line otherwise) in a temporary folder. Tortoise asked you for accepting the certificate : choose 'Permanently accept'. After that, AndroidStudio checked out successfully my files.

解决方案是在临时文件夹中使用 tortoiseSVN 进行结账(否则使用 svn 命令行执行)。Tortoise 要求您接受证书:选择“永久接受”。之后,AndroidStudio 成功检出我的文件。

Please note that AndroidStudio might be configured to use the system svn environment (File > Settings > Version Control > Subversion).

请注意,AndroidStudio 可能被配置为使用系统 svn 环境(文件 > 设置 > 版本控制 > Subversion)。

Hope it will help.

希望它会有所帮助。