1

I am trying to host my php application over phpfog cloud services, this is my first ever try with any GIT client; following the procedure as defined in PHPfog documentations, I am done with creating keys and adding it.

Now I want to know how I can add my project to the cloud, in simple words I have a folder which has all my project file .php, images etc. I want them up over my domain?

How to do that? Do I have to follow GIThub documentation or phpfogs?

Ive been trying for very long now and confused between all this, kindly help with it.

Maven
  • 14,587
  • 42
  • 113
  • 174

1 Answers1

5

You don't need to use Github with PHPFog. PHPFog hosts git repos for you. In the code tab of your app's details, in the PHPFog web console, you will see how to clone down your app. The command will look something like:

git clone git@git01.phpfog.com:myexample.phpfogapp.com

Running that command will clone the app down into a folder named myexample.phpfogapp.com

Next I would move all your project files from your current folder into this new folder. Once you made your file changes and are ready deploy, change directory to the new folder and run the following commands.

git add .
git add -u
git commit -m "Initial commit"
git push

If you run into any "fast forward" errors pushing use the --force switch

git push --force

Another way to do this without the clone would be to initialize a git repo in your current folder and add the PHPFog repo as a remote:

git init
git remote add origin git@git01.phpfog.com:myexample.phpfogapp.com
git add .
git add -u
git commit -m "Initial commit"
git push --force

Side note: you can use Github as an additional remote repo if you want to but its not necessary.

Tim Santeford
  • 27,385
  • 16
  • 74
  • 101
  • thankyou for the reply but while i am starting the procedure with cloning its giving me this following error, can you please explain why? `Unauthorized access for user user-21312 Fatal: the remote hang-up unexpectedly` – Maven Mar 06 '12 at 19:22
  • Did you add your public ssh key to phpfog? – Tim Santeford Mar 06 '12 at 20:48
  • Did you create a new pub key for phpfog or did you use the default id_rsa.pub key? – Tim Santeford Mar 06 '12 at 21:07
  • i followed [Generating a SSH Key ](http://dev.appfog.com/features/article/generating_a_ssh_key) from this documentation and from this i thnk ive created it for default id_rsa.pub. is it wrong? – Maven Mar 07 '12 at 04:45
  • i worked it out, all was i uploaded a accessed all my file through the cloud. but after some time when i cam bak and tried to push some files `git push --force` its again giving me this error: `permission denied (public key). Fatal: the remote hang-up unexpectedly.` however everythign was working fine minutes earlier. kindly help. – Maven Mar 17 '12 at 16:21