简体   繁体   English

Intellij 15 + Github - 无法克隆存储库,出现“存储库测试失败”错误

[英]Intellij 15 + Github - cannot clone repository, getting “Repository Test has Failed” error

I have Intellij 15 and a Github account, and I'm trying to unite the two.我有 Intellij 15 和一个 Github 帐户,我正在努力将两者结合起来。 I went into settings -> Version Control, and added Github with the Host and username and password.我进入设置 -> 版本控制,并添加了带有主机、用户名和密码的 Github。 When I click "Test" - it works.当我单击“测试”时 - 它起作用了。

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".然后我转到我的项目,从顶部菜单中选择 VCS,然后转到“Checkout from Version Control”--->“GitHub”。 It gives me a "Clone Repository Dialog".它给了我一个“克隆存储库对话框”。

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".我输入了正确的 URL、父目录和目录名称...然后单击“测试”。 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.实际上,从那时起,无论“Git 存储库 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!谢谢!

Setup pics - tests successful in the setup:设置图片 - 在设置中测试成功: Git 设置(exe 位置)

GitHub 设置(主机、uname/pass)

尝试将 SSH 可执行文件从 Build-in 更改为 Native。

in my case, after I un-check "clone git repositories using SSH" checkbox from settings/Version Control/github;就我而言,在我从设置/版本控制/github 中取消选中“使用 SSH 克隆 git 存储库”复选框后; it works on clone task.它适用于克隆任务。

for为了

Repository test has failed

follow my answer in the git test error in Intellij按照我在 Intellij中的git 测试错误中的回答进行操作

在此处输入图片说明

Setting->Version Control->GitHub check"Clone git repositories using ssh"设置->版本控制->GitHub勾选“Clone git repositories using ssh”

Removing my other id from keychain fixed it for me.从钥匙串中删除我的另一个 ID 为我修复了它。 So make sure you have just one git id there所以确保你只有一个 git id

I was having this issue until I set the SSH-executable option to use Built-in SSH (just like you have).在我将SSH 可执行选项设置为使用Built-in SSH(就像您一样)之前,我一直遇到这个问题。 This immediately solved my problem and I wasn't getting the error anymore.这立即解决了我的问题,我不再收到错误消息。


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我正在为 git 使用 Windows 安装程序,而不是便携式安装程序在此处输入图片说明
  • And the path to git is set as C:\\Program Files\\Git\\bin\\git.exe并且git的路径设置为C:\\Program Files\\Git\\bin\\git.exe

Apart from these 3 options, my settings look exactly like yours.除了这 3 个选项之外,我的设置看起来与您的完全一样。 I am running windows 10 64bit and my version of IntelliJ is 2016.1.1我正在运行 Windows 10 64 位,我的 IntelliJ 版本是2016.1.1

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 ie 2nd menu button on left单击克隆按钮,即左侧的第二个菜单按钮

Now click the fully qualified link mentioned in the HTTP text box as below:现在单击 HTTP 文本框中提到的完全限定链接,如下所示:

Fully qualified link完全限定链接

Now copy the above copied link to Clone Repository window in IntelliJ and try again.现在将上面复制的链接复制到 IntelliJ 中的 Clone Repository 窗口并重试。 Test connection and It should be successful测试连接,应该是成功的

Try this in cmd在 cmd 中试试这个

git config --global http.sslVerify false

If nothing works after如果之后没有任何效果

 Checking Accept non trusted certificates



UnChecking "clone git repositories using SSH" checkbox

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM