Skip to content
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.

FreeBSD installation

jasin edited this page Sep 7, 2014 · 15 revisions

###FreeBSD 9.2

These are the changes I needed to make to get Codiad-CodeGit to work. This is by NO means an end all guide. It is intended to help ease the frustration. Further system tweaks may be needed, But this is a good start and at best a working example.

Fix for Git not found error. Tell PHP where it is located. Add this line to config.php in CodeGit

putenv("PATH=" .$_ENV["PATH"]. ':/usr/local/bin');

Fix for Git commands not working. Give Shell.sh a proper location for an installed shell. edit the shebang line in shell.sh

#!/bin/sh

Fix for Git Commit/Push/Pull commands not working as intended. edit the expect executable path in shell.sh.

/usr/local/bin/expect

The other major hurdle in FreeBSD is the apache user 'www' has no home directory or login shell. This needs to be changed for 'www' user to run shell.sh which executes the git commands.

change the login shell

$ chsh www -s /bin/sh

create a home directory to hold the ssh keys

$ mkdir /home/www

change the home directory

$ pw user mod www -d /home/www

Change ownership

$ chown www:www /home/www

Then create a rsa key in /home/www/.ssh for 'www' user access to github using push/pull. Don't forget to add the public key to github and test that you have ssh access using

In a shell as user 'www' run the following cmd

$ ssh -T git@github.com 
Clone this wiki locally