IntelliJ IDEA git Permission denied (publickey)

I faced this problem while connecting bitbucket cloud from my Intellij 2019.2 , which thankfully got solved with the following steps. Please note that these steps are to be carried out after you successfully generate and add ssh-public key to your bitbucket/github/gitlab profile.

  1. Open Git-SCM ssh_config file present in Git-SCM installation directory.It’s default location in Windows (for 64 bit) is in C:\Program Files\Git\etc\ssh\
  2. Add the following lines into ssh_config
Host *your-gitlab-or-github-or-bitbucket-hostname*
     IdentityFile *your-ssh-rsa-privatekey-file-with-absolute-path*

for e.g

Host bitbucket.org
     IdentityFile C:/Users/Sahil/.ssh/id_rsa

Source:
https://intellij-support.jetbrains.com/hc/en-us/community/posts/360004124959-IntelliJ-2019-1-3-Can-t-access-git-using-SSH-keys

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)