Deploying With Git Using a Remote Repository
September 28, 2011 Leave a comment
Im deploying Ruby on Rails applications with Git. The code of my personal application was hosted in Beanstalkapp.com because it gives me one free private repo. Following steps can give a basic deployment:
- On the remote server in which your application is running.
- cd /var/www/your_application_directory
- git init
- git remote add production email@example.com:/repository.git
- git pull production master (*)(**)
- On the local machine in which you are changing your code.
- Change/Add some code
- git add .
- git commit -m “Changing some stuff”
- git push beanstalk master
- On the remote server in which your application is running in order to get the new modifications
- git pull production master
- stop the server, in my case mongrel
- restart the server
mongrel_rails start -p PORT_NUMBER -d -e production -P log/mongrel.pid
Permission denied (publickey,keyboard-interactive). fatal: The remote end hung up unexpectedly
you have to set a new RSA key for the remote server. To set a new RSA public key in the remote server, you just need to run
, answer some questions, and copy the content of ~/.ssh/id_rsa.pub.