0

I have windows 7

I am trying:

env.hosts = ['xxx.xx.xx.xxx', 'xxx.xx.xx.xxx', 'xxx.xx.xx.xxx']
env.user = 'root'
env.key_filename = 'C:\Users\Doniyor\Desktop\ssh\secure-life\privkey.ppk'

def dm(): 
   app_path = '/var/www/myproj/'
   env_path = '/var/www/virtualenvs/myproj'
   with cd(env_path):
       run('. bin/activate')

   with cd(app_path):
       run('git pull origin master')
       run('python manage.py collectstatic --settings=myproj.settings')
       run('python manage.py migrate --settings=myproj.settings')
       run('touch conf/uwsgi.ini')

But it keeps asking for root password:

enter image description here

what is missing here? I am fighting for almost 2 days now for it..

doniyor
  • 36,596
  • 57
  • 175
  • 260

1 Answers1

0

Add that private key as an SSH key for user root on all those servers with:

ssh-copy-id root@123.45.56.78

Make sure the SSH Agent is also running. SSH Agent is what uses your private key for authentication when you try to login to a remote server using SSH. Check Running SSH Agent when starting Git Bash on Windows

Community
  • 1
  • 1
tiagoboldt
  • 2,426
  • 1
  • 24
  • 30