trilbymedia / grav-plugin-git-sync Goto Github PK
View Code? Open in Web Editor NEWCollaboratively Synchronize your Grav `user` folder hosted on GitHub, BitBucket or GitLab
License: Apache License 2.0
Collaboratively Synchronize your Grav `user` folder hosted on GitHub, BitBucket or GitLab
License: Apache License 2.0
Good job on this excellent plugin.
One thing I noticed, is that if used with a bitbucket account, you have to slightly edit the pasted https url in order for the plugin to work.
It's just a detail but it might be worth adding it to the doc
Example:
Pasted url from bitbucket: https://[email protected]/myusername/myrepo.git
Working url: https://bitbucket.org/myusername/myrepo.git
Congrats again!
Hello there!
This is likely an issue between the keyboard and the chair and not with Git Sync itself, but I can't seem to figure out what I am missing.
I have installed Git Sync on a local copy and when I go through the wizard I paste:
https://gitlab.com/studio350-private/studio350.com.git
However, I get an error message that says:
fatal: repository 'https://www.studio350.com/studio350-private/studio350.com.git/' not found
Why is it looking for the repository at https://www.studio350.com
when I am entering https://gitlab.com/
?
What is even more interesting is that I am running the wizard from the local copy which is at studio350.local
. I guess the plugin is pulling the actual site URL from somewhere in the configuration files, but I can't seem to figure out from where.
I get the same error when I try to configure the plugin from the actual website at studio350.com
.
The one thing I can think of that can be causing this is that I don't host the website on GitLab in either of these two cases. However, in the introductory video (and the Wizard instructions) only says that you hat o have a repository with one commit in it.
Any help will be much appreciated.
Thank you and have a blessed day!
Respectfully,
Petar
When using the wizard, the URL specified for the WebHook has an extra trailing slash that should not show.
http://mydomainname.ca//_git-sync
It should show as http://mydomainname.ca/_git-sync
A very minor issue... when the wizard is run for the first time the Other (Git) choice seems to still be selected by default.
I would think that no Git service is selected initially (if I recall correctly this was the way it used to be...), and that either the Next button is disabled until a choice is made or perhaps a message is displayed telling the user they must first select a Git service before they continue.
Thanks for considering this suggestion.
Paul
Hi all.
I'm deploying git-sync for the first time and i'm having the next issue while configuring the plugin:
https://Sugarmaster:{password}@gitlab.com/Sugarmaster/mierdatime.git/info/refs
It seems to return a 401 - forbidden when I try to acess this folder.
When I configure and test connection I get this message:
"error: The requested URL returned error: 401 while accessing https://Sugarmaster:{password}@gitlab.com/Sugarmaster/mierdatime.git/info/refs fatal: HTTP request failed"
Any help?
I'm getting the following error when saving a page within the Grav admin.
From https://here.org/there/everywhere * branch master -> FETCH_HEAD error: The following untracked working tree files would be overwritten by merge: plugins/admin/blueprints/admin/pages/modular_new.yaml plugins/admin/blueprints/admin/pages/modular_raw.yaml plugins/admin/blueprints/admin/pages/move.yaml plugins/admin/blueprints/admin/pages/new.yaml plugins/admin/blueprints/admin/pages/new_folder.yaml plugins/admin/blueprints/admin/pages/raw.yaml plugins/admin/pages/admin/ajax.md plugins/admin/pages/admin/backup.md plugins/admin/pages/admin/cache.md plugins/admin/pages/admin/config.md plugins/admin/pages/admin/dashboard.md plugins/admin/pages/admin/denied.md plugins/admin/pages/admin/feed.md plugins/admin/pages/admin/forgot.md plugins/admin/pages/admin/info.md plugins/admin/pages/admin/installer.md plugins/admin/pages/admin/login.md plugins/admin/pages/admin/logout.md plugins/admin/pages/admin/media.md plugins/admin/pages/admin/notifications.md plugins/admin/pages/admin/pages-filter.md plugins/admin/pages/admin/pages.md plugins/admin/pages/admin/plugins.md plugins/admin/pages/admin/register.md plugins/admin/pages/admin/reset.md plugins/admin/pages/admin/site.md plugins/admin/pages/admin/statistics.md plugins/admin/pages/admin/system.md plugins/admin/pages/admin/themes.md plugins/admin/pages/admin/update.md plugins/admin/pages/admin/user.md plugins/admin/themes/grav/app/pages/filter.js plugins/admin/themes/grav/app/pages/index.js plugins/admin/themes/grav/app/pages/page/add.js plugins/admin/themes/grav/app/pages/page/delete.js plugins/admin/themes/grav/app/pages/page/disable-buttons.js plugins/admin/themes/grav/app/pages/page/index.js plugins/admin/themes/grav/app/pages/page/media.js plugins/admin/themes/grav/app/pages/page/move.js plugins/admin/themes/grav/app/pages/page/multilang.js plugins/admin/themes/grav/app/pages/tree.js plugins/admin/themes/grav/templates/forms/fields/pages/pages.html.twig plugins/error/pages/error.md plugins/login/pages/forgot.md plugins/login/pages/login.md plugins/login/pages/register.md plugins/login/pages/reset.md Please move or remove them before you can merge. Aborting
I've copied the plugins folder from my server and pushed the changes to make sure it matches what I have locally - there were some minor differences but none in the admin, error, or login plugins.
Copying plugins/admin/blueprints/admin/pages/modular_new.yaml
specifically from the server and comparing with local shows no difference in the file.
Not sure what the issue is, can you shed any light on it?
Git is installed, accessible as "git", works like a charm in terminal...what could be wrong?
Sync button apparently also works. It's just the wizard that cannot be started for some reason. Tried clearing cache, re-installing....nothing helps....any suggestions?
I have a grav website managed privately in github and I've ensured that "user/config/plugins/git-sync.yaml" is stored properly with password property.
when I publish to heroku though the content is lost and when I go to the "git-sync" plugin, all the credentials exist but the content wont sync. The content only syncs after I re-enter the auth token and save.
How can I get the content to sync properly when I publish a new version of my grav site?
When I finish step 3 of the wizard, this error shows up:
error: The requested URL returned error: 403 Forbidden while accessing https://sunnytranco:{password}@github.com/sunnytranco/gravLearn2.git/info/refs fatal: HTTP request failed
I've already tested my connection, it's fine
While working on my Editable plugin to push changes using the Git Sync plugin event gitsync
, there is a significant delay in the save action from a front-end user perspective. This is because the sync takes about life seconds to complete.
I was thinking about simple having the OS commands execute in the background so I appended a " &" to the $command variable value in 'classes/GitSync.php'. That, unfortunately, doesn't work.
It would be nice to be able to sync in the background.
On first setup, the plugin fails to properly set user/pass causing a 401 unable to access the repository
NEVERMIND, it was, in fact, the Binary Path. I was assuming the prefilled text was adequate. Retyping that pre populated text and saving ha resolved the issue. Sorry for taking up space here.
This is such an exciting plug-in! I wish I could make us of it, but no matter what I have tried, I can't seem to get it to work. I am running the Grav site on a QNAP 453A NAS with QTS 4.3.3 and QGit 2.1.0 installed from here. While the site works flawlessly, the Git-Sync doesn't play well :-( Get the error message, The Git-Sync plugin requires the git binary to be installed and accessible in order to work.
I am guessing it is related to the Git Binary Path field.
When I press the Synchronize button in the plug-in manager, I get the toast message, GitSync has successfully synchronized with the repository. but no changes are actually synced to GitHub.
When I hit the Wizard or Save buttons in the plug-in manager, I get a pop-up with The Git-Sync plugin requires the git binary to be installed and accessible in order to work.
I'm very green when it comes to git and working with command lines so it is most likely something I am doing wrong. Any ideas?
Useful for keeping track who's making changes on Grav installs with multiple users.
On admin actions like onAdminSave
there's $this->grav['session']->user->fullname
With the git-sync plugin installed on the webserver, Grav admin will often be logged out. Logging out usually occurs either when the plugin's configuration panel is saved, or when an edit to a site page is saved (e.g. editing the markdown). It has also happened when navigating to the plugins page through the admin panel sidebar navigation, prompting me to suspect it isn't related to any one page.
The result is that any changes made during that session are discarded. For example, a markdown edit will be reflected on the site, but when the logout occurs after a subsequent edit is saved, both changes are removed and the site is returned to the state prior to the editing session.
When I uninstall the plugin through the admin panel, the issue with random logging out appears to no longer occur, at least not during the time I have tested it (during the same time with the plugin installed it would have occurred roughly 3 or 4 times).
It's quite possibly user error, but I have really no idea how I could have suddenly caused this issue.
Potentially relevant:
"merge branch 'my-branchname' of 'my-repo-url' "
commit not only commits a copy of the entire repo, the commit also appears to occur on none of my repo's branches, I think they're somehow becoming "detached HEADs".Hey guys, this looks really interesting and seems like the missing link to a solid workflow between Grav, GravAdmin, devs and clients.
However the current scoping to the user/pages
directory doesn't quite seem to work right for my needs - I wanted to check if there's some best practices I'm not following?
To elaborate on my setup... I have my site version controlled locally on my machine, in GitHub and on Heroku. I'm working on theme changes locally and then backing them up on GitHub and deploying them to Heroku from my local machine with git push heroku master
, and the client wants to make content changes on the server.
The issue is that for Heroku deployment, I need the whole site to be version controlled.
So maybe I have a few options...
user/pages
directoryAny tips?
Thanks!
I connected Git-Sync to my repo and it succesfully pushes to it. The only thing though is that it pushes a /pages folder to my root.
I tried fixing it by changing a setting in the user/plugins/git-sync/blueprints.yaml file. I changed default: ['pages']
to default: ['user/pages']
. This did not solve the issue. Then I tried changing the payload url of my webhook to http://178.62.255.166/user/_git-sync
. This also did not solve it. @OleVik suggested I'd create an issue here. Is it a Git-Sync issue or am I doing something wrong?
When deploying Skeleton packages and using Git Sync at the same time, you have to login and navigate to the Git Sync plugin page to initiate git the first time. (We also have the plugin preconfigured in a .yaml
-file.
This can of course be done in the console already through a series of Git commands. But running the same commands as the plugin would seems like a stupid idea, in case the plugin ever changes the specific commands it runs on init.
I would find it very useful to have a CLI command for the plugin that I can run on automatic deployment, which would run exactly the commands, that the plugin does, the first time you save it's settings.
Would this be possible for a future release?
A reminder/warning should be included in the README, Wizard or both that if using access rules with Grav to restrict content then only a private git repository hosting service should be used to avoid exposing the same content to the public.
I know it should be common sense but could easily be overlooked/forgotten if new access rules are setup (like I'm in the middle of) or sync is changed to a public repo after the initial implementation.
Server Error
Sorry, something went terribly wrong!
0 - Cipher method not supported. This is normally caused by an outdated version of OpenSSL (and/or OpenSSL compiled for FIPS compliance). Please upgrade to a newer version of OpenSSL that supports aes-256-ctr to use this library.
The grav log file is attached
grav-log.txt
A recent change to how GitLab formats repository HTTPS URLs is causing an error to happen when setting up Git Sync.
Previously, GitLab HTTPS URLs were in this format:
https://gitlab.com/paulhibbitts/sandbox-grav-oer-content-space.git
However, now after a recent GitLab.com update (referred to in https://gitlab.com/gitlab-org/gitlab-ce/issues/30410), this URL can change based on your login state to this format:
https://[email protected]/paulhibbitts/sandbox-grav-oer-content-space.git
While at least there is a workaround (which is a user must first log out of GitLab before running the Git Sync plugin), might it be possible to accommodate both URL formats? Please also note that many (older) open source installs of GitLab still only provide the original format HTTPS URL.
Thanks very much,
Paul
Current setup: /user
is a git repo which contains themes/immo
which is a git submodule.
When I update the theme (submodule) on my local computer and commit the changes in the user repo and push them, the theme folder is marked as modified on the online server. The solution is to run git submodule update --recursive
, but it kind of defeats the purpose of this plugin.
How can I let grav run that command after every pull of the user repo?
What are the best practices for creating reusable themes?
From a security perspective I understand the repo has to be private, but for testing purposes I created a public repo and set up the plugin.
I'm not 100% sure below error is caused by two-factor authentication, but this occurs after saving the settings in the wizard: Invalid username or password. fatal: Authentication failed for 'https://redrohX:{password}@github.com/redrohX/md-content.git/'
.
Is it possible to use the plugin with two-factor enabled on a Github account? I'd rather keep two-factor enabled because this is mandatory within the company I work for.
Will it be possible in the future to connect in a different way to the webhook? Possibly by using the secret key field?
When I first installed and had finished the setup by using the Wizard I got a "fatal: Not a git repository (or any of the parent directories): .git" error message in the Admin panel upon a Save action.
It took me a while to figure out that I needed to initialise a local git repository in the "user" folder instead of in the "pages" folder as I assumed, as that is where content is stored.
I think this requirement isn't mentioned anywhere yet, nor in the docs, nor in the video's.
Would it be possible to have the Wizard do the git init
command if the 'user' folder isn't a git repository?
Thumbs up for this plugin!
Add CLI commands for triggering manual synching. Useful for cronjobs and the likes.
I am hoping to use this plugin to sync code changes, and avoid using FTP altogether on the shared host where I have a little site. For instance, when I make changes to theme files. My impression was that I can push to the repo, then in the GitSync plugin pull the changes (synchronize button). However this does not seem to work. Am I misunderstanding the purpose of this plugin? Is it only for syncing content like posts?
Also in using the synchronize button I get odd errors about untracked files. At first it complained about the .gitignore file, so I temporarily removed it from the repo and added it back. But now I get this:
On branch master # Untracked files: # (use "git add ..." to include in what will be committed) # # accounts/ # config/ # data/ # plugins/ # themes/ nothing added to commit but untracked files present (use "git add" to track)
To start I loaded the entire site onto the server, and later ran the plugin's wizard and connected to a GitHub repo.
Maybe I'm misunderstanding the use case here.
Hello,
I would like to know if it's possible to have an option to sync the content of the user/pages folder and not the user/pages folder itself at the root of a repo.
I versioned grav on an internal git server but i'd like to allow anyone to pull request the content of the pages to improve them. So actually i can't versioned grav and the pages at the same time.
Thank you!
Awesome plugin, but I was surprised that it only syncs the user/pages folder. Why not have an option to sync the user/themes folder too, that would be very welcome during theme development when working with a team (so we won't have to set up another git repo with commit hooks for that).
Thank you for the awesome work!
Correct me if I'm wrong or when I'm not using the correct git terms, but the 2-way sync now uses two different methods to start a sync.
On the remote repository side any file change triggers a pull on the Grav side. So any change remotely is automatically synced and anyone visiting the Grav site after that moment sees the changes.
Now on the Grav side changes to files in the user
folder, usually in page content, do not trigger a push to the remote repository. Only when changes are made in the Admin plugin and the user hits the Save button the plugin pushes the changed files to the remote repository.
Isn't a save on the Grav side in fact the same as a save on the remote side?
In that respect, an automatic sync on a file level within Grav does makes sense wouldn't it? Also any changes to files in the user
folder for example by plugins changing or updating content or pulling in external content would be synced automatically.
List and configure the remote to track and pull from. The local branches and remote branches could be kept in sync to avoid ambiguity. This would allow more traditional workflows external to Grav. It would be then possible to load different branches for development purposes or prototyping, before using a protected branch that is attached to a live instance.
When I try to hide a page (i.e. make it non-visible) it get this error message:
warning: You ran 'git add' with neither '-A (--all)' or '--ignore-removal', whose behaviour will change in Git 2.0 with respect to paths you removed. Paths like 'pages/02.about/default.md' that are removed from your working tree are ignored with this version of Git. * 'git add --ignore-removal ', which is the current default, ignores paths you removed from your working tree. * 'git add --all ' will let you also record the removals. Run 'git status' to check the paths you removed from your working tree. The following paths are ignored by one of your .gitignore files: themes Use -f if you really want to add them. fatal: no files added
And sync is b0rked.
Steps to reproduce:
Result:
[2017-08-16 16:40:11] grav.NOTICE: gitsync[command]: git -C "D:/xampp/htdocs/flat-file-cms/grav-admin/user/" fetch origin master 2>&1 [] []
[2017-08-16 16:40:12] grav.NOTICE: gitsync[output]: From https://bitbucket.org/tarmo888/grav-copy * branch master -> FETCH_HEAD [] []
[2017-08-16 16:40:13] grav.NOTICE: gitsync[command]: git -C "D:/xampp/htdocs/flat-file-cms/grav-admin/user/" pull -X theirs origin master 2>&1 [] []
[2017-08-16 16:40:14] grav.NOTICE: gitsync[output]: From https://bitbucket.org/tarmo888/grav-copy * branch master -> FETCH_HEAD fatal: refusing to merge unrelated histories [] []
Running git pull origin master --allow-unrelated-histories
and writing a message for the master branch merge gets rid of that error.
README.md file in repository doesn't get downloaded to local and .gitignore file that is in local doesn't get uploaded to repository. Is that because .gitignore excludes everything but pages folder?
git --version
git version 2.9.0.windows.1
Add advanced option so that the path to the git binary can be manually specified. It turns out in some scenarios this might be needed.
When I try to delete a page I get the error: Deleting page failed on error: # On branch master # Changes not staged for commit: # (use "git add/rm ..." to update what will be committed) # (use "git checkout -- ..." to discard changes in working directory) # # deleted: pages/05.services/default.md # no changes added to commit (use "git add" and/or "git commit -a").. and it isn't reflected in my Bitbucket repo afterwards. Is delete not implemented yet?
Plugin works great but by default it syncs only /user/pages directory.
I've decided to use plugin for the pages only and second private repo for the rest of the folders (both core and other user folders) - and it's impossible without extra hacking, because - as we can read in
#21 repo of the plugin is created for the whole /user directory.
I suggest to:
Currently a .gitignore file must be added before commit.
It would be nice during the wizard a default .gitignore template would be included for common types of directory binary files that might appear on various systems. Also the ability to adjust the actual save template for the .gitignore. Upon saving, the .gitignore will become a part of the commit.
After having created a repository on GitHub, following the instructions from the wizard, the connection is successfully made and the Webhook functions. I made a small edit to test it, and it works fine. However, the "bot" which pushes the initial commit from Grav to GitHub thinks the time was a little after 2 AM, when in reality it was 9 PM (in Europe/CET).
See this commit for the initial commit, and compare it to the commit history of the repository. Is there some forced time set?
Hi all
Is it somehow possible to sync the whole user folder, instead of only the pages?
This would be a nice backup solution.
Robin
Please see RT forum topic: http://www.rockettheme.com/forum/grav-theme-protean/267611-e-notice-undefined-index-author-error
Member was experiencing issues saving any of his pages. - all gave the fatal error above with nothing in debugbar to help. I tracked the issue down to the git-sync plugin and once disabled normal working order was restored.
when trying to sync or when modifying pages it logs:
grav.NOTICE: gitsync[command]: LC_ALL=en_US.UTF-8 cd /var/www/.../user/ && git status 2>&1 [] []
grav.NOTICE: gitsync[output]: # On branch master nothing to commit (working directory clean) [] []
there's a way to tell the plugin, maybe through its config file git-sync.yaml, in which path has to work?
Everything works fine in my configuration, but saving a page takes "forever" when the plugin is enabled vs. when I disable it.
I assume this is because the plugin waits for the git command to finish, before responding.
Is it possible to change something (configuration wise, or by modifying the plugin) to let git do its thing and already respond with the page anyway after it si stored locally?
I'm also thinking about adding a button somewhere to allow the user to store his work when done, instead of on every change, but I couldn't find an option for this either.
Any Ideas welcome, I'm willing to contribute back to the plugin.
Best Christian
I can't start the initial wizard
clicking the wizard button does nothing, expect from adding a # to the url...
Grav v1.1.17 - Admin v1.2.14 - GitSync v1.0.3
This is essentially a vanilla Grav setup with Admin+GitSync. I have a repo that contains only the user directory contents, which I believe is how this plugin expects it to be. Plugin configuration is standard. Upon saving the settings I get the following:
The only thing potentially noteworthy is that I did not add the webhook to my repository because I only want one-way syncing. If changes happen in Github they will go through my deployment pipeline and get deployed properly anyway with a new image.
Because of this process, I also know no local files are modified. I did log into the instance and am able to manually re-run the failed git command:
git pull -X theirs origin master
From https://github.com/PotomacInnovation/marketing-grav
* branch master -> FETCH_HEAD
error: The following untracked working tree files would be overwritten by merge:
plugins/admin/blueprints/admin/pages/modular_new.yaml
plugins/admin/blueprints/admin/pages/modular_raw.yaml
plugins/admin/blueprints/admin/pages/move.yaml
plugins/admin/blueprints/admin/pages/new.yaml
plugins/admin/blueprints/admin/pages/new_folder.yaml
plugins/admin/blueprints/admin/pages/raw.yaml
plugins/admin/pages/admin/ajax.md
plugins/admin/pages/admin/backup.md
plugins/admin/pages/admin/cache.md
plugins/admin/pages/admin/config.md
plugins/admin/pages/admin/dashboard.md
plugins/admin/pages/admin/denied.md
plugins/admin/pages/admin/feed.md
plugins/admin/pages/admin/forgot.md
plugins/admin/pages/admin/info.md
plugins/admin/pages/admin/installer.md
plugins/admin/pages/admin/login.md
plugins/admin/pages/admin/logout.md
plugins/admin/pages/admin/media.md
plugins/admin/pages/admin/notifications.md
plugins/admin/pages/admin/pages-filter.md
plugins/admin/pages/admin/pages.md
plugins/admin/pages/admin/plugins.md
plugins/admin/pages/admin/register.md
plugins/admin/pages/admin/reset.md
plugins/admin/pages/admin/site.md
plugins/admin/pages/admin/statistics.md
plugins/admin/pages/admin/system.md
plugins/admin/pages/admin/themes.md
plugins/admin/pages/admin/tools.md
plugins/admin/pages/admin/update.md
plugins/admin/pages/admin/user.md
plugins/admin/themes/grav/app/pages/filter.js
plugins/admin/themes/grav/app/pages/index.js
plugins/admin/themes/grav/app/pages/page/add.js
plugins/admin/themes/grav/app/pages/page/delete.js
plugins/admin/themes/grav/app/pages/page/disable-buttons.js
plugins/admin/themes/grav/app/pages/page/index.js
plugins/admin/themes/grav/app/pages/page/media.js
plugins/admin/themes/grav/app/pages/page/move.js
plugins/admin/themes/grav/app/pages/page/multilang.js
plugins/admin/themes/grav/app/pages/tree.js
plugins/admin/themes/grav/templates/forms/fields/pages/pages.html.twig
plugins/error/pages/error.md
plugins/login/pages/forgot.md
plugins/login/pages/login.md
plugins/login/pages/register.md
plugins/login/pages/reset.md
Please move or remove them before you can merge.
Aborting
None of these files are modified of course, but the more strange question to me is why only these in the error? Why not all the other files under plugins/error/
? Since I'm using a standard setup, I'm wondering what is missing here.
Pushing a previous aside here, re #50:
The vertical-align of links within the Wizard produces some oddity on anchors in paragraphs:
Though it works well in the Service Providers list:
Should probably be separated to only target the Service Providers.
As far as I understood the code, the way this plugin currently does authentication for git
is as follows:
repository
from configuration to contain username and decrypted password or token (as in https://user:[email protected]/user/repo.git
)patchedURL
to modify the URL of the configured remote by calling git remote set-url {remote} {patchedUrl}
repository
from config by calling git remote set-url {remote} {repository}
SSH_ASKPASS
or GIT_ASKPASS
.A) put some effort into always return the state to its original state. (not sure how far we can get, but also willing to work on this if preferred.)
B) use the GIT_ASKPASS
approach to provide credentials.
I did some testing and could make it work basically.
As I said the solution I have in mind doesn't solve the last problem, but all the other ones.
I'm happy to provide a PR for it, but only in case the team behind this plugin cares enough to review it.
I hope I didn't offend anybody, I really like the approach that this plugin takes and want to contribute to make it even more awesome.
Best Christian
So may be clueless here but cannot for the life of me figure out how to set up the plugin to only sync to a separate branch from master. in my case "webdev" and not "master" regardless of the why, is this possible?
I'm attempting to setup gitsync for a website on reclaim hosting. In case it matters, I'm using a skeleton template from here. I'm using 2FA, but I've got the application key set up, and I'm using that to sign in (I've got an empty repo here).
Both on step 2 of the setup wizard, when I hit "test connection" and on step 3 when I try to complete the installation, nothing happens (after step 3 my browser says "waiting for nequals.me).
Also after both steps, I can see that there are processes running in cPanel (1 seems to get triggered by the "test connection" step, and 2 seem to be triggered by trying to complete the setup). These processes hang indefinitely, and if I refresh and try again, new processes get piled on.
The only place (I think) I've deviated from the tutorials is that the repo I set up is currently public - is it completely necessary to have a private repo? I'd like it if the source files are accessible, though obviously if there's anything stored that's a security concern it would be worth knowing.
When trying to test connection I get
fatal: I don't handle protocol ''https'
(yes, with the incorrect apostrophes). I tried following your advice and set my git path to
C:/Program Files/Git/bin/git.exe
However, it thinks git isn't installed if I do that. I'm running on MAMP.
Hi guys.
I'm fighting with this for the whole day already. Got tired of manual content sync and decided to give git-sync a shot. But it's just not working for me. Details:
I need to set-up separate branch (like content-sync
), so the plugin could sync the content with it and then I'll merge the changes where I need to. But it looks like it works only when remote branch is set to master
. I have already tried a lot of times to set up it from scratch but the result is the same - when I click save after filling all options:
error: src refspec content-sync does not match any. error: failed to push some refs to 'https://aalyokhin:{password}@bitbucket.org/aalyokhin/reponame.git'
When I set it to master it works like a charm. Tried it with Bitbucket and VS Team services repos - all the same, master works, branch doesn't. What I'm missing? Syncing with master is redicilous...
Logs:
[2017-06-18 11:08:19] grav.NOTICE: gitsync[command]: LC_ALL=en_US.UTF-8 /usr/local/cpanel/3rdparty/bin/git -C '/home/offsfjni/_sites/qa.reponame.com/user/' config user.name "GitSync" 2>&1 [] []
[2017-06-18 11:08:20] grav.NOTICE: gitsync[output]: [] []
[2017-06-18 11:08:20] grav.NOTICE: gitsync[command]: LC_ALL=en_US.UTF-8 /usr/local/cpanel/3rdparty/bin/git -C '/home/offsfjni/_sites/qa.reponame.com/user/' config user.email "[email protected]" 2>&1 [] []
[2017-06-18 11:08:20] grav.NOTICE: gitsync[output]: [] []
[2017-06-18 11:08:21] grav.NOTICE: gitsync[command]: LC_ALL=en_US.UTF-8 /usr/local/cpanel/3rdparty/bin/git -C '/home/offsfjni/_sites/qa.reponame.com/user/' remote get-url "origin" 2>&1 [] []
[2017-06-18 11:08:21] grav.NOTICE: gitsync[output]: https://bitbucket.org/aalyokhin/reponame.git [] []
[2017-06-18 11:08:21] grav.NOTICE: gitsync[command]: LC_ALL=en_US.UTF-8 /usr/local/cpanel/3rdparty/bin/git -C '/home/offsfjni/_sites/qa.reponame.com/user/' remote set-url origin "https://bitbucket.org/aalyokhin/reponame.git" 2>&1 [] []
[2017-06-18 11:08:21] grav.NOTICE: gitsync[output]: [] []
[2017-06-18 11:08:22] grav.NOTICE: gitsync[command]: LC_ALL=en_US.UTF-8 /usr/local/cpanel/3rdparty/bin/git -C '/home/offsfjni/_sites/qa.reponame.com/user/' status 2>&1 [] []
[2017-06-18 11:08:22] grav.NOTICE: gitsync[output]: On branch master nothing to commit, working tree clean [] []
[2017-06-18 11:08:23] grav.NOTICE: gitsync[command]: LC_ALL=en_US.UTF-8 /usr/local/cpanel/3rdparty/bin/git -C '/home/offsfjni/_sites/qa.reponame.com/user/' remote get-url "origin" 2>&1 [] []
[2017-06-18 11:08:23] grav.NOTICE: gitsync[output]: https://bitbucket.org/aalyokhin/reponame.git [] []
[2017-06-18 11:08:23] grav.NOTICE: gitsync[command]: LC_ALL=en_US.UTF-8 /usr/local/cpanel/3rdparty/bin/git -C '/home/offsfjni/_sites/qa.reponame.com/user/' remote set-url origin "https://aalyokhin:{password}@bitbucket.org/aalyokhin/reponame.git" 2>&1 [] []
[2017-06-18 11:08:23] grav.NOTICE: gitsync[output]: [] []
[2017-06-18 11:08:24] grav.NOTICE: gitsync[command]: LC_ALL=en_US.UTF-8 /usr/local/cpanel/3rdparty/bin/git -C '/home/offsfjni/_sites/qa.reponame.com/user/' fetch origin content-sync 2>&1 [] []
[2017-06-18 11:08:25] grav.NOTICE: gitsync[output]: From https://bitbucket.org/aalyokhin/reponame * branch content-sync -> FETCH_HEAD [] []
[2017-06-18 11:08:25] grav.NOTICE: gitsync[command]: LC_ALL=en_US.UTF-8 /usr/local/cpanel/3rdparty/bin/git -C '/home/offsfjni/_sites/qa.reponame.com/user/' pull --allow-unrelated-histories -X theirs origin content-sync 2>&1 [] []
[2017-06-18 11:08:26] grav.NOTICE: gitsync[output]: From https://bitbucket.org/aalyokhin/reponame * branch content-sync -> FETCH_HEAD Already up-to-date. [] []
[2017-06-18 11:08:26] grav.NOTICE: gitsync[command]: LC_ALL=en_US.UTF-8 /usr/local/cpanel/3rdparty/bin/git -C '/home/offsfjni/_sites/qa.reponame.com/user/' push origin content-sync:content-sync 2>&1 [] []
[2017-06-18 11:08:26] grav.NOTICE: gitsync[output]: error: src refspec content-sync does not match any. error: failed to push some refs to 'https://aalyokhin:{password}@bitbucket.org/aalyokhin/reponame.git' [] []
Thanks in advance!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.