RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    (solved) git errors when updating packages (X86)

    Scheduled Pinned Locked Moved Help and Support
    setupupdatesgit
    9 Posts 3 Posters 754 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • YFZdudeY
      YFZdude
      last edited by YFZdude

      Pi Model or other hardware: X86 PC
      RetroPie Version Used: 4.8
      Built From: Manual install on Lubuntu 20.04
      USB Devices connected: Logitech F710, Multimedia Keyboard/Mouse
      Controller used: Logitech F710

      Error messages received:

      fatal: unsafe repository ('/home/michael/RetroPie-Setup' is owned by someone else)
      

      Guide used: https://retropie.org.uk/docs/Debian/
      How to replicate the problem:
      Update packages on Lubuntu 20.04 with latest updates

      So last night I was updating everything and noticed the error message in the console during each package update. Also, ever after updating, every package thinks there is still an update available.

      Here is a snip from the log file while trying to update lr-fceumm:

      Log started at: Sat 23 Apr 2022 08:54:02 PM EDT
      
      fatal: unsafe repository ('/home/michael/RetroPie-Setup' is owned by someone else)
      To add an exception for this directory, call:
      
      	git config --global --add safe.directory /home/michael/RetroPie-Setup
      RetroPie-Setup version: 4.8 ()
      System: x86 (x86_64) - Ubuntu 20.04.4 LTS - Linux michael-lubuntu 5.4.0-109-generic #123-Ubuntu SMP Fri Apr 8 09:10:54 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
      Update is available - updating ...
      /home/michael/RetroPie-Setup/tmp/build/lr-fceumm /home/michael
      
      

      I've tried using the command recommended in the error message, but it still does the same thing. I've also tried adding the [safe] lines to the .git config found inside the RetroPie-Setup folder and no change.

      I can't seem to beat this one. Any help is appreciated.

      Thanks.

      1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator
        last edited by

        @YFZdude said in git errors when updating packages (X86):

        So last night I was updating everything and noticed the error message in the console during each package update. Also, ever after updating, every package thinks there is still an update available.

        What are the permissions on $HOME/RetroPie-Setup ? Did you accidentally changed them from the installation user (michael) to another user (perhaps root) ?

        YFZdudeY 1 Reply Last reply Reply Quote 0
        • YFZdudeY
          YFZdude @mitu
          last edited by

          @mitu said in git errors when updating packages (X86):

          What are the permissions on $HOME/RetroPie-Setup ? Did you accidentally changed them from the installation user (michael) to another user (perhaps root) ?

          Here is the permissions:

          michael@michael-lubuntu:~$ ls -la $HOME/RetroPie-Setup
          total 100
          drwxrwxr-x  8 michael michael  4096 Mar 27 23:07 .
          drwxr-xr-x 21 michael michael  4096 Apr 24 09:59 ..
          -rw-rw-r--  1 michael michael   146 Apr 30  2020 AUTHORS
          -rw-rw-r--  1 michael michael   417 Oct 11  2020 CONTRIBUTING.md
          -rw-rw-r--  1 michael michael   635 Apr 30  2020 COPYRIGHT.md
          drwxrwxr-x  2 michael michael  4096 Mar  6  2021 ext
          drwxrwxr-x  8 michael michael  4096 Apr 22 22:35 .git
          drwxrwxr-x  2 michael michael  4096 Oct 11  2020 .github
          -rw-rw-r--  1 michael michael   179 Mar  6  2021 .gitignore
          -rw-rw-r--  1 michael michael 32265 Apr 30  2020 LICENSE.md
          drwxr-xr-x  2 michael michael  4096 Apr 23 20:55 logs
          -rw-rw-r--  1 michael michael  6374 Nov 24 17:49 platforms.cfg
          -rw-rw-r--  1 michael michael  2033 Oct 11  2020 README.md
          -rwxrwxr-x  1 michael michael  2311 Mar 27 23:07 retropie_packages.sh
          -rwxrwxr-x  1 michael michael   520 Apr 30  2020 retropie_setup.sh
          drwxrwxr-x  7 michael michael  4096 Feb 19 13:38 scriptmodules
          drwxr-xr-x  2 michael michael  4096 Apr 23 21:18 tmp
          

          I searched this error and came up with this:
          https://communities.sas.com/t5/SAS-Communities-Library/What-to-do-when-Git-reports-Fatal-Unsafe-Repository/ta-p/808910

          I think it is related to the recent update to git security. But the fix doesn't seem to work, so it makes me wonder if when the setup script updates and downloads from source if each build folder created in the tmp directory gets its own git config and ignores the global setting somehow.

          For what it's worth, I do believe the updates are working, I checked lr-fceumm and it matches the latest commit. Although I haven't checked them all yet.

          mituM 1 Reply Last reply Reply Quote 0
          • mituM
            mitu Global Moderator @YFZdude
            last edited by mitu

            @YFZdude said in git errors when updating packages (X86):

            I think it is related to the recent update to git security. But the fix doesn't seem to work, so it makes me wonder if when the setup script updates and downloads from source if each build folder created in the tmp directory gets its own git config and ignores the global setting somehow.

            Running

            git config --global --add safe.directory $HOME/RetroPie-Setup
            

            seems to have fix this error for me - I don't get an error during updating. I wonder which git version introduced this.

            YFZdudeY 1 Reply Last reply Reply Quote 0
            • YFZdudeY
              YFZdude @mitu
              last edited by

              @mitu
              Odd, I've run the command with both a full path and $HOME/RetroPie-Setup but neither seems to make it work and both versions of the command add the same line to the $HOME/.gitconfig file.

              I noticed I have git version 2.25.1 installed and according to apt that is the latest available for my distro. Seems the latest version is 2.36 now so maybe it will update eventually and that might take care of it. (?)

              I have another install on the regular Ubuntu elsewhere so when I get a chance I'll try that one and see what it does.

              Since it looks like I can in fact perform the updates regardless I will consider this simply a nuisance issue for the time being.

              Thanks for looking into it.

              1 Reply Last reply Reply Quote 0
              • YFZdudeY
                YFZdude
                last edited by

                To close the loop, it looks like @BuZz fixed this one in the last couple of weeks.

                https://github.com/RetroPie/RetroPie-Setup/commit/e041a0c513aae33ffbdaa0543d8f05188f937ea8

                I no longer get the warnings, but for some reason, I am still seeing messages about there being an update available when I am on the latest commit of lr-fceumm.

                At least the main problem is solved.

                BuZzB 2 Replies Last reply Reply Quote 0
                • BuZzB
                  BuZz administrators @YFZdude
                  last edited by

                  @YFZdude I will check that
                  Probably the same issue.

                  To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                  1 Reply Last reply Reply Quote 1
                  • BuZzB
                    BuZz administrators @YFZdude
                    last edited by

                    @YFZdude the update check should be fixed now.

                    To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                    YFZdudeY 1 Reply Last reply Reply Quote 1
                    • YFZdudeY
                      YFZdude @BuZz
                      last edited by YFZdude

                      @BuZz
                      Yes it is.
                      Thank you very much.

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post

                      Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                      Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.