git Intellij 15 + Github - 无法克隆存储库,出现“存储库测试失败”错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/35611289/
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
Intellij 15 + Github - cannot clone repository, getting "Repository Test has Failed" error
提问by elanamig
I have Intellij 15 and a Github account, and I'm trying to unite the two. I went into settings -> Version Control, and added Github with the Host and username and password. When I click "Test" - it works.
我有 Intellij 15 和一个 Github 帐户,我正在努力将两者结合起来。我进入设置 -> 版本控制,并添加了带有主机和用户名和密码的 Github。当我单击“测试”时 - 它起作用了。
I also have installed the GitHub executable, and added it to the settings as well, and that test was successful as well.
我还安装了 GitHub 可执行文件,并将其添加到设置中,该测试也成功了。
Then I go to my project, select VCS from the top menu, then go to "Checkout from Version Control" ---> "GitHub". It gives me a "Clone Repository Dialog".
然后我转到我的项目,从顶部菜单中选择 VCS,然后转到“Checkout from Version Control”--->“GitHub”。它给了我一个“克隆存储库对话框”。
This is when things get interesting. In that dialog, it shows "Git Repository URL" as "-------------------------------" - yes, a whole bunch of dashes, and the error at the bottom is "Repository URL is a malformed URL or non-existent directory"... Now - I have not found any settings where I can specify it outside of this dialog box, so I don't know where it's taking the URL from...
这是事情变得有趣的时候。在该对话框中,它将“Git Repository URL”显示为“-------------------------------” - 是的,一个整体一堆破折号,底部的错误是“存储库 URL 是格式错误的 URL 或不存在的目录”......现在 - 我还没有找到任何可以在此对话框之外指定它的设置,所以我没有不知道它从哪里获取 URL...
I enter the correct URL, parent directory, and Directory Name... Then I click on "Test". And it gives me "Repository test has failed". Actually, it gives me that same error regardless of what's in the "Git Repository URL" from that point on - even when I put a bunch of gibberish - it still gives the Test Has failed error.
我输入了正确的 URL、父目录和目录名称...然后单击“测试”。它给了我“存储库测试失败”。实际上,从那时起,无论“Git 存储库 URL”中的内容如何,它都会给我同样的错误——即使我放了一堆乱码——它仍然会给出“测试失败”错误。
I have also tried going to "Checkout from Version Control" ---> "Git" - with same results.
我也试过“从版本控制签出”--->“Git”——结果相同。
I have looked online at different forums and tutorials, and nothing seems to help. Any advice would be greatly appreciated!!!
我在网上查看了不同的论坛和教程,似乎没有任何帮助。任何建议将不胜感激!!!
Thank you!
谢谢!
回答by JChord
try to change SSH executable from Build-in to Native.
尝试将 SSH 可执行文件从 Build-in 更改为 Native。
回答by Peter
in my case, after I un-check "clone git repositories using SSH" checkbox from settings/Version Control/github; it works on clone task.
就我而言,在我从设置/版本控制/github 中取消选中“使用 SSH 克隆 git 存储库”复选框后;它适用于克隆任务。
回答by user7025421
回答by Uncaught Exception
Removing my other id from keychain fixed it for me. So make sure you have just one git id there
从钥匙串中删除我的另一个 ID 为我修复了它。所以请确保那里只有一个 git id
回答by Esmaeil MIRZAEE
回答by smac89
I was having this issue until I set the SSH-executableoption to use Built-in
SSH (just like you have). This immediately solved my problem and I wasn't getting the error anymore.
我一直遇到这个问题,直到我设置了SSH-executable使用Built-in
SSH的选项(就像你一样)。这立即解决了我的问题,我不再收到错误消息。
Further options I am using include:
我正在使用的其他选项包括:
- I have opted to use token authentication rather than a password
- I am using the Windows Setup for git rather than a portable setup
- And the path to git is set as
C:\Program Files\Git\bin\git.exe
Apart from these 3 options, my settings look exactly like yours. I am running windows 10 64bit and my version of IntelliJ is 2016.1.1
除了这 3 个选项之外,我的设置看起来与您的完全一样。我正在运行 Windows 10 64 位,我的 IntelliJ 版本是2016.1.1
回答by Sanjay Bhatia
I was also having the same issues with IntelliJ and I tried following:
我也遇到了与 IntelliJ 相同的问题,我尝试了以下操作:
To Solve this problem, Browse to Git location through a web browser:
要解决此问题,请通过 Web 浏览器浏览到 Git 位置:
Click on Clone button i.e. 2nd menu button on left
Now click the fully qualified link mentioned in the HTTP text box as below:
现在单击 HTTP 文本框中提到的完全限定链接,如下所示:
Now copy the above copied link to Clone Repository window in IntelliJ and try again. Test connection and It should be successful
现在将上面复制的链接复制到 IntelliJ 中的 Clone Repository 窗口并重试。测试连接,应该可以成功