Skip to content

osTicket – Bleeding edge using Git

I’ve been using osTicket since the beginning of my IT business. Probably around 2009. osTicket is a brilliant piece of FREE software written in PHP. It can run on almost all web hosting scenarios and is an amazing Support Ticket solution.

Recently the legends over at osTicket have released the latest stable version v1.11 into the wild. Presumably countless hours went into this new edition and all of this beautiful code is FREE for you and me 🙂 So a massive shout out to the guys over at osTicket and God bless.

In comes git

Now the reason for this post is to demonstrate how to use Git (which the osTicket developers use to make changes publicly to the source code). I’ve struggled to understand the concept myself (so many terms and no real time to just push through) but today the legend with the online name @JediKev has made the murky waters clear for me 🙂 Here is the steps for everyone else in case you didn’t know how as well.

Before we start I just want to make a few points in relation to my setup and you will need to change the commands below to suit your scenario:

I use WHM/cPanel so this is why my locations look like below

– Git staging area = /home/USERNAME/osTicket-git

– Public html location = /home/USERNAME/public_html/support

To manage all this you will need to have shell access to your hosting. Not all hosting providers give this, but TechCare does. Come join the fun group over here and get a unique experience and friendly help.

Alright so onto the process:

  1. mkdir /home/USERNAME/osTicket-git/
  2. git clone /home/USERNAME/osTicket-git/
  3. cd /home/USERNAME/osTicket-git/
  4. git fetch origin
  5. git checkout 1.11.x
  6. git fetch origin
  7. git merge
  8. php manage.php deploy /home/USERNAME/public_html/support

As you can see from above the process is not long or tiresome. From here on out you can pull down the latest version from the public branch (which you can change by the way using git checkout command). Then you deploy it using osTicket Team’s CLI to your publicly accessible folder. This is why it is called a “staging” area. Pull down the new files, then deploy them at your leisure.

Single commit

If you want to pull just a single commit (e.g. pull request made by @JediKev 4732) then use a variant of the following commands:

  1. cd /home/USERNAME/osTicket-git/
  2. git fetch origin pull/4732/head:JediKev/pull-4732
  3. git merge JediKev/pull-4732
  4. php manage.php deploy /home/USERNAME/public_html/support

Give it a try and welcome to the wonderful world of git 🙂 Here is the response by @JediKev that gave me what I needed to write this post.

As always have a blessed day and may God be praised.

Steven Swarts

Check out our other posts

Windows 11 Installation - Select Sign In Options

Local User on Windows 11 Professional

Welcome to another short tutorial to demonstrate how to setup a new Windows 11 Professional installation (New PC or fresh install) using a Local User account rather than a Microsoft
Read More
Report Message

M365 Apps – Report Message

End Users This guide assumes your M365 Administrator has enabled the Microsoft App for 365 tenants called Report Message. It will allow you to quickly report an email that is
Read More
Outlook - New Email - Send

Microsoft 365 – Send as alias

Ever wanted to send emails from a domain other than your primary domain? Microsoft, the well known software company that gave us Windows, has recently added this capability to their
Read More

TC Hosting – SSH Keys

How to use cPanel SSH Keys to create a secure connection with your host.
Read More

Ready to get a best solution for your business?

Use the form provided on the contact page or for any urgent requests please call us 08 6146 5344