I have a Python project that has a requirements.txt
project for pip install
to use. I have opened that project in PyCharm. (Side note: PyCharm uses many of the same engines as IntelliJ when it comes to Git integration, so I've tagged that, too).
Upon opening a Python file, as expected PyCharm tells me, "Package requirements are not satisfied." I click "Install Requirements" and after a short time get some errors. All of the errors are related to private GitHub repositories (in requirements.txt
as "git+ssh://[email protected]..."). All of the errors are the same:
Please make sure you have the correct access rights
and the repository exists.
I can run pip install
from the command line without issue, so the problem is not with requirements.txt. The problem appears to be PyCharm not using my GitHub SSH keys (it has never asked me for my SSH key password). The PyCharm docs say to make sure that your public and private keys exist in $HOME/.ssh/id_rsa.pub
and $HOME/.ssh/id_rsa
, respectively, and they do. I have also set up GitHub settings so that PyCharm knows my username and password, but that also did not work.
None of the public Git/GitHub repositories in requirements.txt
cause any problems (they all installed fine). It's only these two private GitHub repositories that PyCharm can't seem to install requirements from.
How do I get PyCharm to use my GitHub SSH keys when installing requirements from requirements.txt
?