Phorkie: Difference between revisions
initial |
No edit summary |
||
| Line 51: | Line 51: | ||
}} | }} | ||
|} | |} | ||
=== Moving Repo Directory === | |||
If the repo directory location changes (such as moving to a new server), you need to update the git repositories' configuration files as well since they have the absolute path of the worktree defined. | |||
Under the {{code|repos/git directory}}, run the following: | |||
{{highlight|lang=bash|code= | |||
/bin/grep -iR "phorkie/www/repos/work" * | awk -F: '{print $1}' | while read i ; do sed -i "s/\/old\/path/\/new\/path/g" $i ; echo $i ; done | |||
}} | |||
[[Category:Code]] | [[Category:Code]] | ||
Revision as of 05:11, 28 September 2015
Phorkie is a patebin like web application written in PHP. It uses only git repositories as its data store.
Installation
Phorkie can be installed on any server with PHP.
cd /home/leo/www
git clone https://github.com/cweiske/phorkie.git
# Set up git directories that act as the data store
cd phorkie
mkdir -p www/repos/git www/repos/work
cp data/config.php.dist data/config.php
# Get dependencies
composer install
Issues
Cannot Create New Text/Paste
Whenever a new paste is created, the following error appears:
Error
Some errors in executing git command Output: Error: *** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: empty ident name (for <leo@web.home.steamr.com>) not allowed
This is a bug with Phorkie where the git command being passed is defining the git user and not owner. This can be fixed by modifying the src/phorkie/Repository/Setup.php file so owner.name and owner.email becomes user.name and user.email.
//keep track of owner
$vc->getCommand('config')
->addArgument('owner.name')
->addArgument($_SESSION['name'])
->execute();
$vc->getCommand('config')
->addArgument('owner.email')
->addArgument($_SESSION['email'])
->execute();
|
//keep track of owner
$vc->getCommand('config')
->addArgument('user.name')
->addArgument($_SESSION['name'])
->execute();
$vc->getCommand('config')
->addArgument('user.email')
->addArgument($_SESSION['email'])
->execute();
|
Moving Repo Directory
If the repo directory location changes (such as moving to a new server), you need to update the git repositories' configuration files as well since they have the absolute path of the worktree defined.
Under the repos/git directory, run the following:
/bin/grep -iR "phorkie/www/repos/work" *