I'm deploying a rails app on digital ocean, following this link. When I followed the exact steps, it worked perfectly. But then I realized the github repository is public. I should have it as private. I create a private repository and changed the remote origin in my local. I put the ssh keys in the new private repository. Removed the old apps folder in the server. And then tried to clone from the remote repository but it asks for password. (It should have taken the ssh key??).
Also I changed the deploy.rb and nginx.conf to reflect the changes of the remote repository and then gave this command,
cap production deploy:initial, but it fails, due to authentication failure in git.
Why does it fail? Why is the ssh key not taking effect?