-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git identity not settable on shared hosting #105
Comments
Hi, thank you for reporting this issue. To clarify, the problem is that you can't set the identity via git config because you don't have shell access to the server, right? You can try putting the following in a php file to set the config once for the repo. After that it should work. Disclamer: I have not tested this. system("cd content && /path/to/git config user.email '[email protected]'");
system("cd content && /path/to/git config user.name 'Your Name'"); Afterwards you can remove this file again. |
i even have shell access and can manually pull the repo without a problem. i guess when php runs it its a different user. the local config is alright (and even global when i ssh into it). setting the --system git config is impossible as there is no etc directory at the location where it is expected and no permissions to create one. tried your script at various stages in my code. no change. i also tried hardcoding the config call in the git-php lib but it still doesnt do the trick.. |
You can only set the user on a repo basis. So skip the --global option and it'll only be set in the repo and should probably work. |
if i look at the repo config with |
looks like a very specific problem to my hosting provider (namecheap). for the moment i have no other ideas and will use my project with the plugin disabled . |
when using the plugin on some shared hosting or other remote servers the git identity isnt set and an error gets thrown.
for example:
Unable to update git: Command 'LC_ALL=C /usr/local/cpanel/3rdparty/bin/git commit '--author=Elias Asisi <****> -m 'update(page): ****'' failed (exit-code 128). Committer identity unknown *** Please tell me who you are. Run git config --global user.email "[email protected]" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: empty ident name (for <[email protected]>) not allowed
i already tried modifying the plugin so it includes the -c argument but the error still gets thrown which is also stated here.
is this related to this issue ?
czproject/git-php#85
seems that you have to separately run
git config
user.name
anduser.email
before every commit.The text was updated successfully, but these errors were encountered: