git with IntelliJ IDEA: Could not read from remote repository

前端 未结 30 1990
夕颜
夕颜 2020-12-07 08:11

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

相关标签:
30条回答
  • 2020-12-07 08:25

    I solved this issue by removing the password for the ssh key in PuTTY.

    0 讨论(0)
  • 2020-12-07 08:26

    I had this problem with a fork from some online course. I cloned my fork and ran into a permissions error. I couldn't understand why it was insisting I was my user from my other company. But as the previous commenter mentioned I had the Clone git repositories using ssh setting checked and I had forgotten to add an ssh key to my new account. So I did and then still couldn't push because I got THIS error. The way I solved it was to push using the Github Desktop client.

    Takeaways:

    1. When you open a new GitHub account make sure to add an ssh key to it
    2. Use different ssh keys for different accounts
    3. In general I run into some GitHub issue on IntelliJ at least once or twice for every project. Make sure you have a copy of GitHub desktop and load your projects into it. It can and will help you with lots of problems you may run into with Intellij - not just this one. It's actually a really nice GUI client and free!
    4. It probably makes sense to do what @yabin suggests and use the native client on a Mac
    0 讨论(0)
  • 2020-12-07 08:26

    I Solved the issue simply by ensuring that I had the correct git SSH url without any trailing spaces:

    git@github.com:USERNAME/REPOSITORY.git
    
    0 讨论(0)
  • 2020-12-07 08:27

    If all else fails just go to your terminal and type from your folder:

    git push origin master
    

    That's the way the Gods originally wanted it to be.

    0 讨论(0)
  • 2020-12-07 08:28

    You need to Generate a new SSH key and add it to your ssh-agent. For That you should follow this link.

    After you create the public key and add it to your github account, you should use Built-in (not Native) option under Setting-> Version Control -> Git -> SSH executable in your Intellij Idea.

    0 讨论(0)
  • 2020-12-07 08:29

    I changed git path and it worked.

    0 讨论(0)
提交回复
热议问题