Since a few weeks, I\'m not able to pull or push from or to the remote repository. I thought it happend when upgrading to IntelliJ IDEA 14, but I can reproduce the problem w
I solved this issue by re-adding remote repository: VCS -> Git -> Remotes.
I started getting Could not read from remote repository
error recently when working with my github repository. My specs:
Of course those problems occurred only when trying to push/pull/fetch etc. from IDE - executing same commands from command line worked like a charm.
I didn't want to switch from Built-In
SSH executable to Native
, mostly because my native SSH client asks me for the password anytime I try to sync with remote repository.
I solved this problem by switching from SSH remote URL to HTTPS URL. According to this GitHub help page - it is recommended to use HTTPS URL instead of SSH one.
SSH
to HTTPS
In IntelliJ IDEA go to VCS -> Git -> Remotes..., select row containing "origin" and click on edit button. If you host your repository on GitHub, replace your SSH URL from:
git@github.com:USERNAME/REPOSITORY.git
to:
https://github.com/USERNAME/REPOSITORY.git
You can also get your HTTPS URL from your GitHub repository home page - click on "Clone or download" button and click on "Use HTTPS" link to display your repository's HTTPS URL:
JetBrains just released IntelliJ IDEA 2017.3.5 that includes fix for SSH access to GitHub - https://blog.jetbrains.com/idea/2018/03/intellij-idea-2017-3-5-fix-for-ssh-access-to-github/
We've recently updated from IntelliJ 12 to IntelliJ 14 Ultimate and we've encountered this problem too. Our solution was to disable the proxy in the settings. We also stopped remembering the passwords once, but might not sure if that helps. Proxy settings are under File-Settings-Apearance & Behavior-System settings-HTTP Proxy.
Adding this answer since none of the answers worked for me.
I had certificates issue - so following command did the trick.
git config --global http.sslVerify false
taken from https://confluence.atlassian.com/fishkb/unable-to-clone-git-repository-due-to-self-signed-certificate-376838977.html
IntelliJ's built-in SSH client seems to hash its known_hosts, but the one I had had its host names in clear text.
When I deleted the file and let IntelliJ create a new one, with only my (hashed) GitLab server and nothing else, it worked.
It's also not possible to mix it - keep some unhashed entries together with hashed entries for IntelliJ. So, you have to configure your other SSH clients to use hashed hosts.
This fixed it for me (I am using SSH, not HTTPS, and the native git, not the built-in) on MacOS High Sierra (10.13.5)/IntelliJ IDEA 2018.4: