'Intellij cannot sync private repository

I have recently imported a project from a private repository and a lot f the dependencies are not syncing. Everytime I run sync I get the error

[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I have already imported the project using an access token and SSH. Still nothing works.

What should I do so that these dependencies can sync



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source