Skip to content

General Project Setup

Josef Komenda edited this page Mar 31, 2016 · 8 revisions

Directory Setup

After running through the environment setup, create a 'projects' directory: mkdir ~/projects

'projects' will hold the downloaded source code for each git repo without being fully built out (core files, contrib code, etc.) This is also generally the location one uses to push code to Pantheon.

A ~/Sites/ directory should already be in place. When a project is installed, it gets built here. For Drupal sites, the ~/Sites/PROJECTNAME/profiles/PROJECTNAME/ directory will be the location you use to push code to GitHub.

Jekyll sites are an exception to the above; they are installed directly in ~/Sites/PROJECTNAME

Individual projects should be installed according to their wiki docs.

There are persistent Drupal setup errors related to file permissions and .htaccess configs.
Permission errors can be fixed with:
chmod -R 777 ~/Sites/PROJECTNAME/sites/default/files

If you have no CSS and cannot access pages other than the homepage, run:
sed -i '' 's/# RewriteBase \/$/RewriteBase \//g' ./.htaccess
in the ~/Sites/PROJECTNAME directory.

Github Setup

Enter your name and email, and add an rss key:

  • git config --global user.name "GITHUB-USERNAME"
  • git config --global user.email "GITHUB-EMAIL"
  • ssh-keygen -t rsa -b 4096 -C "GITHUB-EMAIL" (follow instructions - defaults are fine)
  • cat ~/.ssh/id_rsa.pub | pbcopy (this puts the key in your copy buffer)
  • Go to Github and add your ssh key When you clone your first project, you will be prompted for the password you used when you generated your ssh key. Save it in your keychain!

While you are at it, turn on 2-factor auth for GitHub.

Pantheon Setup

Password-free access to Pantheon: https://pantheon.io/docs/generate-ssh-key/

Clone this wiki locally