I'm a (non-technical) intern at a place where I can't use my normal laptop, and I have a lot of free time. I'm learning how to program, and I'd like to be able to use a completely cloud-based development environment, because I can't install anything on the computer I have access to here.
I signed up for Cloud9 IDE, connected it to my GitHub account, and cloned a repo containing a little Sinatra project I'm working on. The problem is, I don't know how to push any changes I make in Cloud9 to Heroku. Basically I'm flying blind. If I were on my laptop, I'd just hop on terminal, commit my changes, and run git push heroku master
. At work, that's not an option, since I'm not developing anything locally. Cloud9 has a console built in with git installed, so I tried installing rubygems by running git clone https://github.com/rubygems/rubygems.git
so I could install the heroku gem, but I couldn't figure out how to unpack / install it.
Am I on the right path? Any suggestions as to how I can develop entirely in the cloud?
First, you need to add the remote github repo:
git remote add origin [email protected]:username/yourapp.git
git push origin master
You'll then probably get: "Permission Denied (publickey)".
You have to tell github about the SSH key that cloud9ide is using. You can see your SSH key on the cloud 9 dashboard at http://cloud9ide.com/dashboard.html by clicking the 'show your SSH key' link.
Click the copy button to copy your SSH key to the clipboard. Now, head on over to github.com. Login and click Account Settings. Choose the 'SSH Public Keys' option and 'Add another public key'. Save your changes. You are now, good to go and can push from your cloud9 repo.
It looks like you should be able to run git remote add heroku [email protected]:<application>.git
and then git push heroku master
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With