
Hey everyone, so in anticipation of my next set of projects based on Yocto and of course, it’s best to use version control whenever coding as well as providing a way to host on my own website I decided to try and get git onto my server itself.
It was a bit tricky finding any articles on this, most google results were referencing people using github to version control their website, not to actually host git on their website. However I finally stumbled across this article:
https://github.com/to-ro/install-Git-on-a-GoDaddy-shared-hosting-server
Now, full credit where credit is due, this person is a champion and most of the article is correct… Except step one! The domain they reference looks like they lost it sometime ago or at least removed those downloads of the binaries. Also, GoDaddy uses four different versions of Linux for it’s servers so it would only work if you pre-planned on setup and selected CentOS. Plus, if GoDaddy decides to update the server to a newer version, you might have version compatibility issues. How to solve? This is what I’ll cover, but once we have a binary installed of Git, you can pretty much follow the rest of his article all fine and dandy.
So, the first part he offers up is to SSH into the server. I’d never done this before but it wasn’t difficult, in your main login, you’ll see SSH and manage as below:

Okay so now I use the manage button to get the username, I know my password and get the SSH details. I simply then input the server address into PuTTy, accept the certificate and then login at the terminal.
This was when I ran into the error at wget, not found. So instead I chose to install git by making it. I checked and gcc is on the server so a great start.
Note: one key point I learned is that you can’t simply install things, that’s what we’ll be addressing here in this article. Tar only supports tar.gz and they also only support unzip.
With the above note I had to download the tar.gz latest source code of git:
https://mirrors.edge.kernel.org/pub/software/scm/git/
Next extract, we won’t be able to install this into the traditional bin directory. So at configure we need to set that this installs instead to our home directory with the addition of:
./configure --prefix=/home/[username]/git
Now we can make, but here’s where I found gettext wasn’t installed, this popped up as missing msgfmt which a bit of google indicated this is a binary from gettext.
Similar to before, I download gettext from:
https://www.gnu.org/software/gettext/
Same as above, I configure:
./configure --prefix=/home/[username]/gettext
Now I run make and make install and I see at my /home/[username]/gettext/bin directory there is msgfmt. When I go to rerun the make for git though, I still get an error. Easily fixed, we have our binary, we just need to add it’s strange location to PATH:
export PATH="$PATH":/home/[username]/gettext/bin
Hey presto, now when I make git, it builds all fine! Next, make install, and then repeat above:
export PATH=”$PATH”:/home/[username]/git/bin
I then created my directory with mkdir and setup a folder structure (/repos/yocto/meta-nilrt) I use meta-nilrt because that will be my next article. We’ll be adding menders to a CompactRIO so that we can remotely deploy whole new filesystems without troubles. Then I can actually get to work updating the build tools and other things on NI Hardware. It’ll be pretty cool, or at least… I think it is.
At this stage, you can now follow the article I referenced at the start from the point of git init’ing your desired repo folder. I then tested by using my own server and it worked! I pushed a commit which included a new README file.

So if you’d like to do this yourself, hopefully this will give you the know-how in order to do so. The final part is to maintain this persistently, so:
nano .bash_profile
And you’ll see that there is already a line adding a bin directory in $HOME to PATH. Basically just replicate this but for our gettext and git bin directories, save and close. Done!