ssh/git not working in PyCharm despite working in the command line.

I just started using gitlab and I am having trouble using it from PyCharm using ssh.

Fetching from the remote repository fails:

10:43:54.832: git -c core.quotepath=false fetch origin --progress --prune
java.io.IOException: Authentication failed:
    at org.jetbrains.git4idea.ssh.SSHMain.authenticate(SSHMain.java:298)
    at org.jetbrains.git4idea.ssh.SSHMain.start(SSHMain.java:172)
    at org.jetbrains.git4idea.ssh.SSHMain.main(SSHMain.java:137)
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

Yet executing the same git command from the command line works fine. If I pull the repository using https instead of ssh everything also seems to work ok. Does anyone have any ideas for why this could be the case, and how to fix it?

Please sign in to leave a comment.