0

I created droplet with Ubuntu Dokku v0.4.2 on 14.04 in digital ocean and try to push my node app on my VPS. My problem is: I can authenticate like root by ssh key BUT I can't do the same like dokku user and get demand of password when I use command: git push dokku master. or when make call: ssh dokku@myServerIp.

As mentioned in tutorials I used command:

$ cat ~/.ssh/id_rsa.pub | ssh root@myServerIp "sudo sshcommand acl-add dokku me@mycomp"

before any operations with dokku user.

1 Answers1

0

If the key is working for the root user, try this as root.

Take the /root/.ssh/authorized_keys file and copy it into /home/dokku/.ssh/ From there, chown the file from root to dokku and then restart ssh with an /etc/init.d/sshd restart.

Lando
  • 419
  • 3
  • 8
  • Thx for your replay. It was very helpful. but unfortunately I still can't push my app. Now , after I followed your suggestions, I can authenticate by `ssh dokku@myServerIp` but if i try to call `git push dokku master` I get again : `fatal: [app name] does not appear to be a git repository` and next line`fatal: Could not read from remote repository` . If you have any suggestions I 'll be very appreciate. – Михаил Анохин Oct 14 '15 at 20:59
  • Yes, you can't push to the remote server to a git repository that hasn't been initialized (yet). I'm not so familiar with git but I believe if you have git installed on your remote host and you were to do this: `git init --bare` and then you on your local host set the remote upstream to your server, it should work. Try reading some of this, it should be helpful: http://thelucid.com/2008/12/02/git-setting-up-a-remote-repository-and-doing-an-initial-push/ – Lando Oct 14 '15 at 21:02