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
12 Posts 4 Posters 3.0k 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.
  • 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
                    • C Offline
                      C Offline
                      charlesnw
                      wrote last edited by
                      #12

                      I have this working in both directions now!

                      The key was :

                        14  su www-data -c 'git config --global user.name ReachableCEO'
                         15  su www-data -c 'git config --global user.email charles@turnsys.com'
                      

                      And I then created a page in grav and it synced up to my repo:

                      image.png

                      Thanks to everyone for the assistance!

                      1 Reply Last reply
                      4
                      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