3

I get the feeling this is going to boil down to a fundamental misunderstanding of SSH keys, but I cannot seem to pinpoint why I can no longer git push dokku master to my Dokku + Docker setup on Digital Ocean. I followed this tutorial to a tee when I initially set up my droplet and I was able to deploy to Dokku just fine until I poked around in the container and somehow crippled Docker and/or Dokku (still trying to understand those as well...). I doubt it was irreparable but I grew impatient so I just wiped out the entire droplet and started the tutorial over from scratch.

This time, however, after setting everything back up exactly the same way, I can SSH into "root@mydomain.com" just fine, but I cannot push to Dokku. Instead, after waiting an eternity, I get:

failed: Broken pipe 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights and the repository exists.

Checking the /var/log/auth.log I see that a session indeed gets established:

Jan  8 00:56:39 localhost sshd[19559]: Accepted publickey for dokku from 79.113.124.516 port 56067 ssh2
Jan  8 00:56:39 localhost sshd[19559]: pam_unix(sshd:session): session opened for user dokku by (uid=0)

I've tried to make heads or tails of this post but to no avail. I feel like it must have something to do with the fact that I wiped out the entire VM droplet and replaced it (however it still has the same IP). I removed the connection from ~/.ssh/known_hosts and re-added it when I SSH'd in again to the new instance for the first time (which works fine). I also followed the README steps for configuring Dokku. Nothing. Which is odd to me because I never had to do any of this the first go round. Any ideas?

Community
  • 1
  • 1
dooleyo
  • 872
  • 1
  • 9
  • 13
  • Out of curiosity, what's the output of `git remote -v`? Also, you mention that you tested to root as root, but the logs show a login as dokku, so you might want to double check that as well. – jpetazzo Jan 08 '14 at 16:21

1 Answers1

0

I am also encountering the same problem.

Followed the tutorial here: https://www.digitalocean.com/community/articles/how-to-use-the-dokku-one-click-digitalocean-image-to-run-a-ruby-on-rails-app

and then pushed the git from my local computer (of which i added ssh key into dokku in beginning) so i doubt that problem is that you changed keys.

UPDATE: i have found another article describing:

Don’t use ssh-copy-id: This would give users full access to your server and they wouldn’t be able to git push because it uses the git user

https://medium.com/code-adventures/438bce155dcb

so perhaps this is the problem? having the public key for both server and dokku creates problem pushing code?

Mikelangelo
  • 907
  • 8
  • 20