Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Grav CMS
  3. Grav Git sync

Grav Git sync

Scheduled Pinned Locked Moved Grav CMS
11 Posts 4 Posters 2.5k Views 4 Watching
  • 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.
    • C Offline
      C Offline
      charlesnw
      wrote on last edited by
      #1

      I am trying to get grav git sync to work.

      Starting with a bare repo https://git.knownelement.com/reachableceo/reachableceo.com .
      root@274c4e05-0aea-49c1-8c4a-aff47c566f65:/app/data/user# git status
      fatal: detected dubious ownership in repository at '/app/data/user'
      To add an exception for this directory, call:

          git config --global --add safe.directory /app/data/user
      

      root@274c4e05-0aea-49c1-8c4a-aff47c566f65:/app/data/user# git config --global --add safe.directory /app/data/user
      error: could not lock config file /root/.gitconfig: Read-only file system
      root@274c4e05-0aea-49c1-8c4a-aff47c566f65:/app/data/user#

      Any way to solve this?

      If I use a repo that is initalized, it complains about divergent branches. And the suggested ways to fix all involve git --config which fails.

      1 Reply Last reply
      1
      • jdaviescoatesJ Online
        jdaviescoatesJ Online
        jdaviescoates
        wrote on last edited by
        #2

        Does doing this help? https://docs.cloudron.io/apps/grav/#cli

        I use Cloudron with Gandi & Hetzner

        1 Reply Last reply
        1
        • M Offline
          M Offline
          mononym
          wrote on last edited by
          #3

          Hello. I can confirm that once in the /app/code/user directory sudo -u www-data git status works. I had to run sudo -u www-data git config pull.rebase false when I set up the git-sync plugin.

          1 Reply Last reply
          1
          • C Offline
            C Offline
            charlesnw
            wrote on last edited by
            #4

            Thanks! That worked (running git config pull-rebase false).

            1 Reply Last reply
            1
            • C Offline
              C Offline
              charlesnw
              wrote on last edited by
              #5

              Well it was able to push up to the repository. It doesn't pull down. Also the Repository Web Hook URL instructions aren't clear. Do I need to add this on the gitea side? The grav side?

              J M 2 Replies Last reply
              1
              • C charlesnw

                Well it was able to push up to the repository. It doesn't pull down. Also the Repository Web Hook URL instructions aren't clear. Do I need to add this on the gitea side? The grav side?

                J Offline
                J Offline
                joseph
                Staff
                wrote on last edited by
                #6

                @charlesnw are you pulling down with https or ssh? if ssh, you probably need the ssh keys in the app

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  charlesnw
                  wrote on last edited by
                  #7

                  HTTPS. Grav was able to push content to the repository. It's just not pulling content down.

                  https://git.knownelement.com/reachableceo/Reachableceo.com is the repository I'm using.

                  1 Reply Last reply
                  0
                  • C charlesnw

                    Well it was able to push up to the repository. It doesn't pull down. Also the Repository Web Hook URL instructions aren't clear. Do I need to add this on the gitea side? The grav side?

                    M Offline
                    M Offline
                    mononym
                    wrote on last edited by
                    #8

                    @charlesnw
                    The webhook is on the gitea side: it triggers the sending of changes to grav when new commits/push occurs.

                    1 Reply Last reply
                    0
                    • C Offline
                      C Offline
                      charlesnw
                      wrote on last edited by
                      #9

                      That is what I thought.

                      My grav instance webhook doesn't include the FQDN, just /(blah blah) . I am presuming on the gitea side, I use https://fqdn/blahblah as the webhook? I use type gitea?

                      I use gitea webhooks to send events to discord so I know they work.

                      1 Reply Last reply
                      0
                      • J Offline
                        J Offline
                        joseph
                        Staff
                        wrote on last edited by
                        #10

                        Have you tried git clone via the Web terminal already ? Just to see if this is some Cloudron issue or app level ?

                        1 Reply Last reply
                        0
                        • M Offline
                          M Offline
                          mononym
                          wrote on last edited by mononym
                          #11

                          I cloned my grav theme repository (https link) into app/code/user/themes and use it in one direction only by pulling changes with sudo -u www-data git pull to update the website.

                          The git-sync extension basically adds (automatic) pushing as well by initializing a git directory in the app/code/user directory.

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Bookmarks
                            • Search