I first installed ITFlow about 1 month ago. A few weeks back I tried to do an update for the first time and it didn't work. I got distracted and only now got back to it. I just tried to do an update again. When I click the "Update App" button, it spins for a minute, shows a green pop-up box that says "update successful", then nothing changes. The pending updates are still there. I tried to run a git pull as mentioned in other posts, but I got an error saying fatal: detected dubious ownership in repository at '/var/www/html'. It mentions adding an exception, which I'm happy to do, but I didn't want to do something like that without at least posting and seeing what the expected behavior would be.

24 days later

johnny Apologies for the late reply. A vacation followed by all the tickets to deal with after said vacation distracted me for a bit and I'm just coming back to this.

When I try to run the git fetch --all command I get an error stating:
fatal: detected dubious ownership in repository at '/var/www/html

To add an exception for this directory, call:

git config --global --add safe.directory /var/www/html

Should I add the exception it mentions? To be honest I'm not sure what's causing both the error and issues updating. As far as I remember I didn't do any manual changes to ITFlow pages or code.

7 days later

@johnny I just wanted to check and make sure you'd seen my reply since I didn't hear back from you last week. Did you have any thoughts or ideas?

Thanks

try this as root

chown -R www-data:www-data /var/www

It may just be a permission issue.

    johnny Ran that command then git fetch --all again and got the same error.

    Edit: if it makes a difference I actually ran that as root, not just a sudo command.

    Lets blast the git out of the way here and recreating by doing the following:

    cd into the itflow directory

    delete .git directory rm -rf .git

    while in the that directory run the following commands 1 by 1

    git init

    git remote add origin https://github.com/itflow-org/itflow.git

    git fetch

    git reset --hard origin/master

      johnny

      root@ITFlow:/var/www/html# rm -rf .git

      root@ITFlow:/var/www/html# git init

      Initialized empty Git repository in /var/www/html/.git/

      root@ITFlow:/var/www/html# git remote add origin https://github.com/itflow-org/itflow.git

      fatal: detected dubious ownership in repository at '/var/www/html'

      To add an exception for this directory, call:

      git config --global --add safe.directory /var/www/html

      try the suggestion there

      git config --global --add safe.directory /var/www/html

      then retry the following

      git fetch

      git reset --hard origin/master

        johnny Progress. After that, the update screen shows . Clicking the button to upgrade the database does nothing.

        Were getting there, keep clicking update database until no more db updates as you have to update the db sequentially

        That seems to have done it, thanks. It's still giving me that error about not having git fetch installed though. Do I need to worry about that at all?

        yeah thats interesting, im not sure why thats coming up because you obviously have git installed

        I'm gonna submit a small update lets see if it shows up

        okay I just pushed out an update, lets see if your ITFlow sees it and can update to it

          johnny Do I need to wait a certain amount of time or do anything to manually check for updates? I got this screen right after your post. Just in case I went ahead and rebooted the server and still got the same thing.

          hmmm so for some reason your web server is not able to communicate with git on the shell. There should absolutely be an update there

          Did you install this via install script? Tell me some details on your install? OS Version, PHP ver, How you installed

            johnny No, I forget why now but the script didn't work for me for some reason. I ended up using the manual install method. The only difference is I used Let'sEncrypt rather than manual PEM keys for the encryption.

            johnny I got that same error as before about the dubious ownership in repository. I tried adding the exception both in and out of sudo, but no change. Still getting the same error.

            Edit: Just saw your edit on the previous post. It's a Debian 11 server with PHP 8.2.