Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Plugins

Alternative to Git Sync

Solved by Marco Cevoli View solution

Started by Marco Cevoli 2 years ago · 11 replies · 382 views
2 years ago

Hi,

Context:
I was a happy user of the Git Sync plugin. I used it to sync our current Grav site to Gitlab, and then we connected our translation tool to Gitlab so that we could translate/localize our site.

Unfortunately, our hosting provider made Git as an additional, very expensive, feature, so I decided to move to another hosting that offers Git, but -no matter how I set Git global configuration - I get this error:

"fatal: unable to create thread: Resource temporarily unavailable fatal: the remote end hung up unexpectedly send-pack: unexpected disconnect while reading sideband packet fatal: the remote end hung up unexpectedly error: failed to push some refs to <my gitlab repo>'

I don't think this can be solved, because we're on a shared hosting and I suppose we have limitations in the use of Git, so I'm exploring alternatives.

Question:

How can you sync the /pages/ folder from a Grav installation to a Git repo on Gitlab without using the Git Sync plugin?

I thought about creating a scenario in Make.com, but afaik Grav doesn't have a Rest API that can be used with no-code tools.

TIA.

Marco

2 years ago

Hi @marcocevoli ,

While my technical knowledge of Git is very limited one thing that sometimes is an issue with shared hosting is the Git version (which may be quite old on a shared hosting setup)... I think GitSync expects Git 2.9 and above, perhaps you could confirm with your shared hosting co with that?

If the above does not produce the desired results, perhaps move to another shared hosting service that supports Git? I use Reclaim Hosting (https://www.reclaimhosting.com/) with Git Sync and things once setup work very well. I think Reclaim still offers a European Server option, but not sure https://forums.reclaimhosting.com/t/hosting-location/877.

Oh, and also if I recall Git Sync also requires some additional PHP functions which sometimes are not enabled by default, here is more info on that topic: https://github.com/trilbymedia/grav-plugin-git-sync/issues/223

last edited 11/10/24 by Paul Hibbitts
2 years ago

Thanks, Paul. Indeed I have Git v. 2.43.5. I'll see if I can update it and if this solves the issue.

We don't have the exec error, so I think PHP functions are correctly set.

Moving to another shared hosting won't be possible. We've just moved from the old one to the new one, and it's not refundable.

2 years ago

Duh. Mental note to self: Never reply to a post when you're tired. 🙂

2 years ago

ok, after lot of tinkering, still no success. I tried:

  • deleting all .git folders
  • creating a new, empty repo on Gitlab
  • uninstalling and reinstalling Git Sync plugin

At some point I got the Fetch head... issue, but eventually I managed to get rid of it.

Yet, I keep getting the error

"fatal: unable to create thread: Resource temporarily unavailable fatal: the remote end hung up unexpectedly send-pack:..."

I'm giving up and I'm back to square 1: looking for an alternative.

TIA,

Marco

2 years ago

Thanks, Paul. I appreciate your help. I already came across that page, and tried all possible solution to no avail... 😦

2 years ago

Good to know. I'll give it a try and report back here. Thanks.

12 months ago

Oh I just saw this. I'm curious to know how it went. I really built it for myself (for clients) and it's still a little rough so I've never released or mentioned it. @pamtbaau has provided invaluable help.

I won't be surprised if you say you had trouble setting it up.

I built it because I promised clients they could do this based on believing the GitSync pitch without actually testing it, which was dumb. I was very underwhelmed with GitSync, sorry to say.

I have at least five sites using this, generally without issues.

last edited 06/30/25
5 months ago Solution

I’m reopening this old thread to tell you that I finally found a solution:

the suggestion proposed here https://github.com/trilbymedia/grav-plugin-git-sync/issues/198 was spot on. However, the values that worked for me are:

INI

[pack]
threads = 1
windowMemory = 200m
packSizeLimit = 200m
window = 1
deltaCacheSize = 512m
[http]
postBuffer = 524288000
lowSpeedTime = 999999
lowSpeedLimit = 1
[core]
compression = 1
[ssh]
postBuffer = 1048576000

[pull]
rebase = true
ff = only
[init]
defaultBranch = main

Configuring those in .gitconfig at the server root solved the issue.

👍 1

Suggested topics

Topic Participants Replies Views Activity
Plugins · by Rene, 1 week ago
2 41 1 week ago
Plugins · by Xavier, 4 weeks ago
2 50 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1178 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 45 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 68 2 months ago