PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, August 1, 2022

[FIXED] How to push code from Cloudways to Github

 August 01, 2022     cloudways, ftp, git, github, ssh     No comments   

Issue

Is it possible to deploy code from a Cloudways app to an empty git repository? I would like to know if it's possible as I'm currently using FTP (Filezilla) for that. I'm able to clone a live site to a staging site, but cannot deploy it to Github in order to work on the files on my local machine.


Solution

You should first make sure you can deploy your Cloudways application (that you have copied through filezilla locally) with Git, and pushed to a GitHub repo:
See "Deploy Code to Your Application Using Git".

Once your SSH access is setup, you can click "start deployment" to initiate the process. It will fetch the GitHub repo, and deploy it.

That means, to the question "Is it possible to deploy the code from a cloudways app to an empty git repository?": no, the publication process is the other way around.

That would involve:

  • Generating and downloading SSH keys
  • Uploading the SSH public key to your Git Repository
  • Copying the Repository SSH address
  • Deploying code from your Repository

The last step being:

  • Back on Cloudways console, paste the SSH address you got in Step 4 into the Git Remote Address field and click on the Authenticate. This will ensure that there are no blockers in the communication between Cloudways and Git service (which is Github in our example) .
  • Then choose the branch of your repository (master will be selected as default) you want to deploy from.
  • Next, type the deployment path (i.e. the folder in your server where the code will be deployed). Make sure to end it with a /.
    If you leave this field empty, the code will be deployed to public_html/.
  • Finally, click on the Start Deployment button to deploy your code to the selected path.

https://support.cloudways.com/wp-content/uploads/2018/03/git-deploy-new1.png



Answered By - VonC
Answer Checked By - David Goodson (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing