0

I am able to log onto GitHub on the internet and I have permissions to see the project (I am even able to download it in zip file format). But somehow I am unable to make the connection to GitHub through the IDE of Intellij IDEA.

I have set up the connection -- properly, apparently -- using the "Settings" dialog in the IDE on the "GetHub" option under "Version Control", because when I click on the "Test" button, there is a pop up message that says "Connection successful"

I followed the steps on this website: Java Intellj with GitHub ... for the most part. The only reason I did not follow the final steps to the letter was because I already had a project open and I had to close the IDE and reopen it because of this.

Now, in the dialog that comes up at the beginning when you restart Intellij IDEA with the title "Welcome to IntelliJ IDEA", I am prompted with "Check out from Version Control" but when I try to connect, nothing happens. Then, when I click on the "Events" prompt, it comes up saying:

**Clone Failed**
Could not read from remote repository.

Please advise.

Adil B
  • 14,635
  • 11
  • 60
  • 78
xarzu
  • 8,657
  • 40
  • 108
  • 160
  • Which protocol do you use to clone the repo? I suggest you create an SSH key, import it into your github account and then use it to clone your repo. Also make sure you're not blocked by a firewall or proxy. – BitfulByte Jun 06 '18 at 05:14
  • Crossposted at https://www.java-forums.org/intellij-idea/97457-help-intellij-idea-communicate-github.html and https://coderanch.com/t/695011/ide/IntelliJ-GitHub and https://www.dreamincode.net/forums/topic/411344-connecting-intellij-to-git-hub/ – SurfMan Jun 07 '18 at 07:50

2 Answers2

1

Teaming up with coworkers helped lead to the solution. From the Welcome window, there is the option to clone a repository. The default URL options that are populated and presented in a drop down list have the wrong format for a URL. They each start with "git@github.com..." which is not correct.

I put the proper URL address to our repository on github.com in this field, and soon everything fell into place

xarzu
  • 8,657
  • 40
  • 108
  • 160
0

IntelliJ uses command-line git client to clone/push/pull. Looks like you either use SSH-based access which is not properly configured, or git client has some cached credentials that do not work for the URL you are trying to clone from.

If it is SSH-based access, make sure you have all the keys in place and .ssh/config set (if ket names are non-default).

If it is HTTP-based access, check if there are some credentials saved, try clearing or disabling credential-helper.

You should also check the Console tab of the Version Control toolwindow for the full error message, maybe there is something else.

Dmitrii Smirnov
  • 7,073
  • 1
  • 19
  • 29