Phorkie
From Leo's Notes
This page was last edited on 20 September 2015, at 23:28.
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();
|