Closed bsheen closed 3 years ago
I will try to catch this scenario. Keep in mind that those global steps are kinda mandatory for any kind of git activity. I hear you though that it would be nice to get at least the same output in the admin to understand what's going on.
@w00fz to add further context, I was installing the plugin into a Grav installation which is part of a Docker container. Hence, git wasn't setup as it would be as would be on a development machine.
As you say, it would be helpful to get an appropriate error message in the admin to point the user quickly to a resolution.
Do you know if there's a way to get this reproduced after git is all set? I'm trying to get to that state on my local but I can't get it erroring out.
I removed my user/email from ~/.gitconfig
and user/.git/config
but still goes through the synchronization.
You could look at spinning Grav up inside of a Docker container from one of the public images: https://hub.docker.com/r/benjick/grav/
I tried again from the benjick/grav
docker but it did work as expected from both admin and CLI. Doesn't seem like I can reproduce this, not until I reinstall my machine perhaps. Or perhaps this is already sorted somehow on GitSync?
If anyone has any idea how i can reproduce on mac or ubuntu the Please tell me who you are
error, I can try simulating it. Right now I just can't find any way to get that error popping up after I already have my globals configured, sorry.
@w00fz thanks for your efforts. This issue/discussion might help anyone in future facing the same find a resolution.
Running the
bin/plugin git-sync sync
command from the CLI yields:However, from
http://localhost/admin/plugins/git-sync
in the Admin if I clickSynchronize
I get the following message:GitSync has successfully synchronized with the repository
But changes are not reflected in the repo on GitHub.When I execute the git config commands as suggested both the CLI command and
Synchronize
button in the Admin plugin work as expected and the changes are reflected in the repo.Obviously, this is easily dealt with by setting git user.email and user.name via the config command. However, I'm reporting this as better reporting of the error in the Admin plugin would be beneficial for those attempting to track down why syncing is not working from the Admin plugin.