Advertisement
verygoodplugins

Untitled

May 12th, 2016
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. ssh-keygen -t rsa -C "youremail@gmail.com"
  2. cat ~/.ssh/id_rsa.pub
  3.  
  4. Copy public key into SSH keys on BitBucket
  5. ssh -T git@bitbucket.org (to verify)
  6. vim ~/.ssh/config
  7.  
  8. Add:
  9.  
  10. Host bitbucket.org
  11. IdentityFile ~/.ssh/id_rsa
  12.  
  13. and save.
  14.  
  15. git clone git@bitbucket.org:username/project-file.git
  16. (to the project file)
  17.  
  18. git pull (should now work without auth)
  19.  
  20. Create a file git.php in the theme directory with the contents:
  21.  
  22. <?php `git reset --hard HEAD`; ?>
  23. <?php `git pull`; ?>
  24. <?php `find . -type d -print0 | xargs -0 chmod 0755`; ?>
  25. <?php `find . -type f -print0 | xargs -0 chmod 0644`; ?>
  26.  
  27. Go into project settings >> hooks and add a new POST hook directed at the git.php file. For example:
  28.  
  29. http://yoursite.com/wp-content/themes/yourtheme/git.php
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement