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
6 Replies
Project ID:
97b19625-14e4-46b6-8fdc-357b0774d177
97b19625-14e4-46b6-8fdc-357b0774d177
have you set all those variables in your service variables?
yes, I set all the variables the same way as on the local computer
I don't use dockerfile, could that be the problem?
sorry, no clue, may be best to read the SSHTunnelForwarder's docs
thank you for your reply