Re: [Open-Source-CAD] Issues trying to use git to update an installation

25 views
Skip to first unread message

Eric Osterberg

unread,
Aug 2, 2026, 12:14:56 PM (yesterday) Aug 2
to open-so...@googlegroups.com
Hi Darren,

Good news: nothing is broken, nothing is lost, and it is not your shared
hosting. One word went missing from a command, and everything you are seeing
follows from that.

The command is:

    git checkout -f -B main origin/main

It reads a bit oddly because "main" appears twice. The first one is the name
of the branch to create, and the second is where to start it from. Yours ran
as:

    git checkout -f -B origin/main

so git took "origin/main" as the name for a NEW branch and started it from
where you already were - your old code. That is why the files are missing:
you never actually moved to the new version.

The giveaway is in the message you quoted. It said:

    Switched to a new branch 'origin/main'

If it had worked it would have said:

    Switched to a new branch 'main'

That is worth remembering as a general check - if the name in quotes is not
plain "main", something went sideways.


TO FIX IT

From your TicketsCAD folder, run these three, in order:

    git fetch origin
    git checkout -f -B main origin/main
    git branch -D origin/main


The second one is the command with the missing word restored. You should see
two lines this time - one about tracking, and "Switched to a new branch
'main'".

The third deletes the stray branch that got created. It is only tidying up,
but leaving a branch called "origin/main" lying around will confuse git later.

Then carry on with the video:

    php sql/run_migrations.php
    php tools/check-schema.php


Those files will exist once the checkout has actually happened.


ABOUT THE "git pull" ERROR

That was a symptom of the same thing, not a separate problem. Your branch had
been created out of thin air rather than from the remote, so git had no idea
what it was supposed to be pulling from. Once you are on a properly created
"main", plain "git pull" will work from then on.

You did no harm running it. It refused precisely because it could not tell
what you meant, which is git being careful rather than git being broken.


ON KRYSTAL AND SHARED HOSTING

You can rule that out. The error you got was:

    Could not open input file: sql/run_migrations.php

That means PHP started up perfectly well and then could not find the file.
If PHP itself were unavailable or restricted you would have got a completely
different error, or nothing at all. So your host is fine, and command-line
PHP is working.

Shared hosting is a supported setup and we test for it - if anything else
does look off once you are on the new version, tell us and we will treat it
as a real bug rather than a hosting quirk.


ONE LAST THING

Thank you for writing this up as clearly as you did. Quoting the exact
messages you saw is what made it a two-minute diagnosis instead of a long
back-and-forth. It has also shown us that the command is easy to mistype and
that the failure is quiet about why, so we are adding a note to the
troubleshooting guide covering exactly this.

If the three commands above do not sort it, send me the output of:

    git status
    git branch -a


and I will take another look.

73,
Eric


On Sun, Aug 2, 2026 at 10:54 AM Darren Deakin (UKDeek) <ukd...@gmail.com> wrote:
Hi all.

So, I have attempted to follow the video for using Git to update an older installation. I don't know if this is relevant, but I am on shared hosting with Krystal, but Tickets has always run fine on here in the past, but then again, I have never attemped Git or anything like this.

I followed the steps in the video from Eric, and all seemed to work.

After I completed the git checkout -f -B origin/main command, I got the message "Swirched to a new branch 'origin/main' "

I then attempted to run the command php sql/run_migrations.php and got the error "Could not open input file: sql/run_migrations.php". I also get a similar error for the command php tools/check-schema.php

I did check the files within my TicketsCAD install, and couldn't find the above php files.

I did something foolish and tried git pull, and got the following: "There is no tracking information for the current branch. Please specify which branch you want to merge with. git pull <remote> <branch>"

Not sure if I done something wrong or this is something to do with the shared hosting, but any help would be appreciated.

Thanks.

Darren.

--
You received this message because you are subscribed to the Google Groups "Open Source CAD" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-source-c...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/open-source-cad/14427557-7f70-4e36-8e61-bf4848c5a01cn%40googlegroups.com.

Eric Osterberg

unread,
Aug 2, 2026, 12:22:05 PM (yesterday) Aug 2
to open-so...@googlegroups.com
Hi Darren,

Now that you are on the current version, there is one setup step the video
does not cover, and it is the one most likely to bite you quietly. I would
rather you hear it from me than discover it in three weeks.

TicketsCAD has four background jobs that need something to run them on a
schedule. On a normal server that is handled by the operating system. On
shared hosting like Krystal you have to set it up yourself, and if you do
not, nothing complains - the jobs simply never run. That is the part I want
to save you from.


WHAT THE FOUR JOBS DO

1. PAR scheduler
   PAR is the personnel accountability roll call - the "everyone check in and
   confirm you are OK" process. This job starts a roll call when one is due,
   and marks a unit as missed when they do not answer in time. Without it,
   PAR only works if a dispatcher presses the button by hand, and an
   unanswered check-in produces silence rather than an alert. This is the one
   I would not want left unrun.

2. Notification and pending message sweep
   Some messages are deliberately held for a short window before sending, so
   a dispatcher can pull one back. This job releases them when the window
   closes. It also delivers push notifications, which are queued rather than
   sent during the dispatch action itself. Without it, held messages stay
   held forever and push notifications never arrive.

3. Webhook retry
   If you connect TicketsCAD to another system and a delivery fails, this
   retries it. Harmless to skip if you do not use webhooks.

4. Backups
   Takes and verifies a database backup on a schedule, and deletes old ones
   so they do not pile up. More on this below, because shared hosting has a
   wrinkle.


SETTING IT UP ON KRYSTAL

Krystal gives you cron through your control panel - look for "Cron Jobs",
usually under an Advanced section. You are adding four entries.

First you need two things:

The full path to your TicketsCAD folder. From SSH, go into the folder and
run:

    pwd

It will look something like /home/yourusername/public_html/tickets

The full path to PHP. Run:

    which php

If that gives you nothing useful, your control panel will list the PHP
versions available. You want the command-line one, and you want the same
version the website is using.

Then add these four cron jobs. Replace PHPPATH and TCADPATH with what you
found above.

    */5 * * * * PHPPATH TCADPATH/tools/par_tick.php >/dev/null 2>&1
    */5 * * * * PHPPATH TCADPATH/tools/pending_messages_tick.php >/dev/null 2>&1
    */15 * * * * PHPPATH TCADPATH/tools/webhook_retry_tick.php >/dev/null 2>&1
    0 3 * * * PHPPATH TCADPATH/tools/backup_run.php >/dev/null 2>&1


So a finished line looks roughly like:

    */5 * * * * /usr/local/bin/php /home/deakin/public_html/tickets/tools/par_tick.php >/dev/null 2>&1

The first three run every five or fifteen minutes. The last runs once a day
at 3am.


TWO THINGS THAT CATCH PEOPLE OUT

The ">/dev/null 2>&1" on the end is not optional in practice. Without it,
cron emails you the output of every single run. At every five minutes that is
around 288 emails a day from one job alone. Everybody learns this once.

Second, use the command-line PHP, not the web one. On shared hosting they can
be different versions with different settings. If the jobs behave oddly, this
is the first thing to check.


CHECKING THAT IT ACTUALLY WORKED

This is the important bit, and it is why I am writing rather than assuming.

Wait ten minutes after adding the cron jobs, then in TicketsCAD go to
Settings, then Status, and find the Scheduled background jobs section. Each
job shows when it last ran successfully. If a job has never run, it says so
plainly.

Do check this. A cron job that was typed slightly wrong fails silently -
there is no error anywhere, the job simply never happens. The Status page is
the only place that tells you.


ONE ROUGH EDGE, AND I WOULD RATHER WARN YOU THAN HAVE YOU CHASE IT

If the Status page reports a job as not running, the fix it suggests is
currently written for a full server - it will tell you to run commands
starting with systemctl. Those do not exist on shared hosting and you cannot
run them. Ignore that wording. On Krystal the answer is always to check your
cron entry in the control panel.

That is our shortcoming, not yours, and we are fixing the wording so it
matches the kind of hosting you are actually on. In the meantime, do not
spend any time on it.


BACKUPS, AND YOUR DISK QUOTA

Shared hosting gives you a fixed amount of disk space, and database backups
are not small. TicketsCAD is careful about this, but you should know how it
behaves:

- It keeps a limited number of backups and deletes older ones automatically.
- Before writing a new backup it checks free space, and if writing one would
  take you below a safe margin it refuses and records why, rather than
  filling your account up.
- All of that is adjustable in Settings under Backup and Maintenance -
  how many to keep, how many days, and how much free space to protect.

Worth setting the retention to something modest given a shared hosting quota.
Two or three backups is usually plenty if you also download one occasionally.

If you cannot get cron working at all, there is a fallback: TicketsCAD can
take its backup during an ordinary page load instead. It is on by default and
it will keep you covered. The reason it is a fallback rather than the plan is
that the person who happens to load that page waits while the backup runs.


IF SOMETHING DOES NOT LOOK RIGHT

Send me what the Status page shows for the scheduled jobs and the exact cron
lines you entered, and I will spot it. Nine times out of ten it is a path
that is very slightly off.

None of the above is urgent. The system runs fine without it - you just lose
the automatic parts, quietly, which is exactly why I wanted to flag it before
you needed them.

73,
Eric

Darren Deakin (UKDeek)

unread,
Aug 2, 2026, 2:52:00 PM (23 hours ago) Aug 2
to Open Source CAD
Sorry about this, but somehow I completely broke my installation - this is not a major drama, as this was just a test installation, so nothing lost.

This gave me the perfect opportunity to do a completely fresh install. I am following the video. and I am hitting a snag at the "git clone" stage - it is asking for my github username and password, and when I enter this I am getting the following error:
"remote: Invalid username or token. Password authentication is not supported for Git operations.
Fatal: Authentication failed for" and then the github address...

Eric Osterberg

unread,
Aug 2, 2026, 2:57:59 PM (23 hours ago) Aug 2
to open-so...@googlegroups.com
Can you provide the URL you were using? There is a private repo that requires a username and password, and there's the public repo with the released code. And let me know where you found the instructions, there might be an error pointing to the non-public version. My AI tools work on the non-public and only after security scans do I release the code.

Darren Deakin (UKDeek)

unread,
Aug 2, 2026, 3:02:52 PM (23 hours ago) Aug 2
to Open Source CAD
I am using the one shown in the video - https://github.com/openises/TicketsCADv4.git

Darren Deakin (UKDeek)

unread,
Aug 2, 2026, 3:03:35 PM (23 hours ago) Aug 2
to Open Source CAD
Sorry, should stipulate the video - https://www.youtube.com/watch?v=BGfE-Nmcbag (Training Module 9)

Eric Osterberg

unread,
Aug 2, 2026, 3:20:38 PM (23 hours ago) Aug 2
to open-so...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages