R
Railway•9mo ago
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
6 Replies
Percy
Percy•9mo ago
Project ID: 97b19625-14e4-46b6-8fdc-357b0774d177
yarik.03k
yarik.03k•9mo ago
97b19625-14e4-46b6-8fdc-357b0774d177
Brody
Brody•9mo ago
have you set all those variables in your service variables?
yarik.03k
yarik.03k•9mo ago
yes, I set all the variables the same way as on the local computer I don't use dockerfile, could that be the problem?
Brody
Brody•9mo ago
sorry, no clue, may be best to read the SSHTunnelForwarder's docs
yarik.03k
yarik.03k•9mo ago
thank you for your reply
Want results from more Discord servers?
Add your server
More Posts