yarik.03k
ssh tunneling error
When trying to deploy a django project the following error occurs "raise ValueError('No password or public key available!')
ValueError: No password or public key available!". My ssh key doesn't use a password to log in.
I am using ssh tunneling in my project to connect to a remote database. I enter data through environment variables.
When trying to run the project on a local computer, this error is not present. I think this is a problem in Procfile.
If there are any solutions, it would be much appreciated😃.
Here is the code:
settings.py
ssh_tunnel = SSHTunnelForwarder(
(os.getenv('SERVER_IP'), int(os.getenv('SSH_PORT'))),
ssh_pkey=os.getenv('SSH_PKEY'),
ssh_username=os.getenv('SSH_USERNAME'),
remote_bind_address=('localhost', int(os.getenv('REMOTE_BIND_ADDRESS'))),
)
Procfile
web: gunicorn p2p_project.wsgi
9 replies