Last active
December 23, 2015 08:29
-
-
Save trebi/6607804 to your computer and use it in GitHub Desktop.
How to compile GIT on FreeBSD shared host
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=============================== | |
SERVER (COMPILE AND SET UP GIT) | |
=============================== | |
1) Obtain 'gmake' binary and extract, since FreeBSD uses 'pmake' | |
curl -O ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8.4-release/All/gmake-3.82_1.tbz | |
tar xjf ../gmake-3.82_1.tbz | |
2) Obtain 'git' sources and extract | |
... | |
3) Configure git for compilation, if some library is not located at usual place, find it with 'whereid' and override it (in my case perl) | |
./configure --prefix=$HOME --with-perl=perl | |
4) Make, some libraries could be missing in your host so repeat this command with more and more disabled libraries until it suceed. In my case: | |
gmake NO_MSGFMT=1 NO_TCLTK=1 NO_GETTEXT=1 NO_PTHREADS=1 install | |
5) Pass your own config file to ssh that will be used by your git, so it could connect to remote repo with your ssh key. Create file in ~/bin/git-ssh.sh with following content | |
#!/bin/sh | |
exec /usr/bin/ssh -q -F ~/.ssh/config "$@" | |
and add to ~/.profile | |
export GIT_SSH="git-ssh.sh" | |
==================================== | |
SERVER (SET UP GITHUB AND SSH KEYS) | |
==================================== | |
1) Add to ~/.ssh/config where deployment_rsa is your private deployment key | |
Host * | |
UserKnownHostsFile ~/ssh/.ssh/known_hosts | |
IdentityFile ~/ssh/.ssh/deployment_rsa | |
2) After first successful deploy, optionally add to ~/.ssh/config | |
StrictHostKeyCheckin 1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment