Intellij 15 + Github - cannot clone repository, ge

2019-02-09 07:59发布

问题:

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.

I also have installed the GitHub executable, and added it to the settings as well, and that test was successful as well.

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".

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...

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.

I have also tried going to "Checkout from Version Control" ---> "Git" - with same results.

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:

回答1:

try to change SSH executable from Build-in to Native.



回答2:

in my case, after I un-check "clone git repositories using SSH" checkbox from settings/Version Control/github; it works on clone task.



回答3:

Removing my other id from keychain fixed it for me. So make sure you have just one git id there



回答4:

I was having this issue until I set the SSH-executable option to use Built-in SSH (just like you have). 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
  • 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



回答5:

for

Repository test has failed

follow my answer in the git test error in Intellij



回答6:

Setting->Version Control->GitHub check"Clone git repositories using ssh"



回答7:

I was also having the same issues with IntelliJ and I tried following:

To Solve this problem, Browse to Git location through a web browser:

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:

Fully qualified link

Now copy the above copied link to Clone Repository window in IntelliJ and try again. Test connection and It should be successful