Skip to content

Latest commit

 

History

History
89 lines (63 loc) · 2.24 KB

File metadata and controls

89 lines (63 loc) · 2.24 KB

Get Started with git-deploy

1. Generating a new SSH key

SiteGround

  1. Go to "Siteground -> SSH Keys Manager" to generate a new SSH key.

  2. Click to view the "Private key", copy and save as file "NAME-private.ppk".

  3. Launch PuTTYgen, load the private key, choose DSA, and save the private key as file "NAME-putty.ppk".

  4. Click to view the "Public key", and copy the public key

  5. Go to your "GitHub Settings -> SSH & GPG Keys -> New SSH key" and paste your public key.

Other hosting

  1. Paste the command below, substituting in your GitHub email address.
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
  1. When you're prompted to "Enter a file in which to save the key," press Enter.

  2. At the prompt, type a secure passphrase.

  3. Get the private key by pasting the text below. Copy the private key using the command:

cat ~/.ssh/id_rsa
  1. Save private key as file "NAME-private.ppk".

  2. Launch PuTTYgen, load the private key, and save the DSA private key as file "NAME-putty.ppk".

  3. Get the public key by pasting the text below. Copy the public key using the command:

cat ~/.ssh/id_rsa.pub
  1. Go to your "GitHub Settings -> SSH & GPG Keys -> New SSH key" and paste your public key.

2. Setup the deployment script by following instruction in README

  • Install via composer
composer require senangprint/git-deploy:dev-master

3. Setup git on production server

  1. Initialize git repo
git init
  1. Add safe directory
git config --global --add safe.directory <project root directory>
  1. Add remote origin
git remote add origin <github repo ssh url>
git fetch origin
git checkout main
  1. Set upstream
git branch --set-upstream-to=origin/main main
  1. Pull origin
git pull

References

Debugs

Permission key denied