Clicking on Git from IntelliJ IDEA gives permission denied (publickey)

I am trying to push / drag a new Java project from IntelliJ IDEA . I created a new repo on GitHub and added my files through the Git Shell terminal. So, we can verify that I can push / pull out / commit this repo through Git.

Now when I try to do this through the IDE - in this case IntelliJ IDEA, I get this error:

03:07:26.514: cd C:\Users\Dan\IdeaProjects\MystikTextRPG
03:07:26.514: git log origin/master..master --pretty=format:%x01%H%x02%ct%x02%an%x02%at%x02%ae%x02%cn%x02%ce%x02%P%x02%s%x02%b%x02%B%x03 --encoding=UTF-8 --full-history --sparse -M --name-status --
03:07:28.341: cd C:\Users\Dan\IdeaProjects\MystikTextRPG
03:07:28.341: git push --progress origin master:master
Warning: Permanently added 'github.com,192.30.252.128' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

With a key error

Push failed
fatal: Could not read from remote repository.

I have keys .ssh, because there are necessary files in my user folder.

So my question is: why am I getting this error when I push patched updates to my Git, when can I do this through the command line terminal via Git Shell?

SSH SSH GitHub, , , ...

enter image description here

ssh -T git@github.com SSH- , :

Warning: Permanently added 'github.com,IP_ADDRS' (RSA) to the list of known hosts.
Hi naknode! You've successfully authenticated, but GitHub does not provide shell access.

, IntelliJ IDEA, permission denied (publickey)?

+4
1

cygwin...

. IntelliJ 2017.3.5 Ultimate git 2.16.2 cygwin. windows cmd git 1.9.5.mysgit.0.


ssh ~/.ssh, IntelliJ, , Windows. C:\Users\Dan\.ssh. , , .
, , , config. , :

Host gitlab.my.host.com
    HostName gitlab.my.host.com
    User DanTheDan
    IdentityFile C:\Users\Dan\.ssh\keys\gitlabXX_id_rsa

My C:\Users\Dan\.ssh dir :

config    (File)
keys      (Dir)

keys .


. cygwin, vim IntelliJ, . .
, , intelliJ Settings>Git:

  • Git
  • SSH

. , bash, Git -cygwin git.exe AppData/Local, - bash , ssh Git - cygwin F:\cygwin64\bin\git.exe.
SSH- .


, Q & A. intelliJ ssh.

0

All Articles