simple-php-git-deploy icon indicating copy to clipboard operation
simple-php-git-deploy copied to clipboard

Deploy a private repository easily (without SSH)

Open rocksbrasil opened this issue 6 years ago • 0 comments

Hello everyone, after a few tries, I have found an easy way to deploy your github applications without adding SSH keys, just adding the credentials of your Github account to the HTTPS address, and would like to share with the community, for example:

[GitHub] https://USERNAME:[email protected]/username/repo-name.git

it will only be necessary to define in the project code, following example:

/**
 * The address of the remote Git repository that contains the code that's being
 * deployed.
 * If the repository is private, you'll need to use the SSH address.
 *
 * @var string
 */
define('REMOTE_REPOSITORY', 'https://USERNAME:[email protected]/username/repo-name.git');

This method can also be used by repository collaborator accounts, making it easier for those who need to deploy the application to multiple servers without generating SSH keys.

rocksbrasil avatar Jun 28 '19 16:06 rocksbrasil