#ssh tunneling error

8 messages · Page 1 of 1 (latest)

tacit jolt
#

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

queen vigilBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

plucky vaultBOT
#

Project ID: 97b19625-14e4-46b6-8fdc-357b0774d177

tacit jolt
#

97b19625-14e4-46b6-8fdc-357b0774d177

cosmic ledge
#

have you set all those variables in your service variables?

tacit jolt
#

yes, I set all the variables the same way as on the local computer

#

I don't use dockerfile, could that be the problem?

cosmic ledge
#

sorry, no clue, may be best to read the SSHTunnelForwarder's docs