Deploying Rails with Dokku - Dokku#Dokku.me Password? - ruby-on-rails

Im deploying a rails app to a digitalocean server with these steps.
http://dokku.viewdocs.io/dokku/application-deployment/
problem is when i get to the Deploy App section it says
Now you can deploy the ruby-rails-sample app to your Dokku server. All you have to do is add a remote to name the app. Applications are created on-the-fly on the Dokku server.
git remote add dokku dokku#dokku.me:ruby-rails-sample
git push dokku master
When i enter that its asking to enter dokku:dokku.me password.
Does anyone know why or what is the default password for this? No mention of dokku.me before this step.

We don't set a password on the user, so this is likely your ssh key's password.

dokku.me is a placeholder for the documentation. Replace it with your digital ocean droplet hostname

I solved the mine by typing this command in my terminal
cat ~/.ssh/id_rsa.pub | ssh root#serverIp "sudo sshcommand acl-add
dokku laptop"
after type your password and you can try again to deploy

Related

Capitrano authentication fails with Git bash on Windows

I configured capitrano to deploy a Rails app from Git bash on Windows. I created one rsa key to connect to the remote server with the user deploy and another rsa key to connect to bitbucket with my account.
Before deploying I set up the ssh-agent with both keys.
When deploying I have an authentication failed (publickey error) nevertheless when I try to ssh deploy#myserver.com it works and from inside my server if I try git -T git://bitbucket.org it connects and show me my username.
How can I debug this issue?
The issue was that the ssh client used by capitrano doesn't handle ssh-agent on Windows. The solution was to use Pageant the agent of the putty project but before importing keys to pageant they have to be converted to the ppk format by puttykeygen

Connection refusal when pushing to Heroku, Bitbucket

I have had no issue pushing to Heroku or Bitbucket over the past few weeks. Now whenever I issue the command $ git push , or $ git push heroku I receive the same message:
ssh: connect to host git.bitbucket.org port 22: Connection refused
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I have been using the cloud9 IDE, pushing to BitBucket with no issue, and am really at my wits end in trying to determing why I can't push anymore....
Any advice out there?
It sounds like you haven't authorized your computer's SSH key. You'll need to log into Heroku / bitbucket and make sure that your local ~/.ssh/id_rsa.pub file is appropriately copied over.
For Heroku, if you're using their command line tool, you can add your SSH keys easily:
$ heroku keys:add
Just had this same problem. I had to restart the C9 server and things worked fine after that.

Rails app deployment on heroku

I have two heroku accounts one using email abc#gmail.com and one using xyz#gmail.com
previously I deployed a rails app to my xyz#gmail.com account but now I want to deploy to abc#gmail.com account using the same machine. I logged in using my credentials for abc#gmail.com using the following command
heroku login
but when I do a git push it still uses xyz#gmail.com and gives the error message that xyz#gmail.com does not have access to the application's repository.
I have generated the ssh key for account abc#gmail.com and added it to heroku as well so technically it should work but it is not
please help
Heroku login is only used for interaction with the CLI - git uses SSH.
You can either:
Add xyz#gmail.com as a collaborator to abc#gmail.com
or
Assuming that abc#gmail.com already has a public/private key uploaded to Heroku edit/Create ~/.ssh/config
Host heroku.abc
HostName heroku.com
IdentityFile ~/.ssh/<abc.key>
Update your projects ~/.git/config to use git#heroku.abc:.... in the remote entries.
So that git remote -v shows:
heroku git#heroku.abc:appname.git (fetch)
heroku git#heroku.abc:appname.git (push)
So now when you push to the heroku remote SSH will use the key defined on the heroku.abc entry in your ~/.ssh/config

Switching Between Heroku's Remote Repos

I'm facing a curious problem.
I'm running a Linux box, with two Desktops. Here's my environment:
Desktop 1: Running a pet project
Terminal 1
Heroku Login: my personal e-mail
Heroku App 1
Desktop 2: Running a real project
Terminal 2
Heroku Login:same as above: my personal e-mail
Heroku App 2
When I switch from Desktop 1 to Desktop 2, from my pet project to the real project, surprise! Terminal 2 is connected in Heroku App 1!
How can I fix this, keeping separate environments, properly switching between two Heroku's environments?
Thanks in advance.
You should use the Heroku Accounts cli plugin.
$ heroku plugins:install git://github.com/ddollar/heroku-accounts.git
$ heroku accounts:add personal
Enter your Heroku credentials.
Email: david#heroku.com
Password: ******
Add the following to your ~/.ssh/config
Host heroku.personal
HostName heroku.com
IdentityFile /PATH/TO/PRIVATE/KEY
IdentitiesOnly yes

How to provide password for Capistrano rails 3.1 app deployment to aws ec2 ubuntu server?

We are trying to deploy a rails 3.1 app on a aws ec2 instance running ubuntu 12.04. With cap deploy, However, we are stuck with the password hint. There is only private key in aws ecs login and there is no password. How can we pass the ssh login for ec2 deployment?
Thanks so much.
This is what I did to solve this scenario:
On the local machine, generate a key using e.g. ssh-keygen. Keep the standard location to not overcomplicate things, i.e. keyfiles should be ~/.ssh/id_rsa and id_rsa.pub; SKIP THIS STEP IF YOU ALREADY HAVE KEYS IN .ssh
Copy the content of the id_rsa.pub file
SSH into the EC2 instance using your .pem keyfile
Paste the content of your local id_rsa.pub into /home/[YOUR_EC2_USER]/.ssh/authorized_keys
You should now be able to use capistrano for your deployment.

Resources