I have built the following post-receive hook:
#!/bin/sh
cd /var/node/heartbeat/ || exit
unset GIT_DIR
echo $USER
git pull --no-edit
When I'm pushing to the repository the following error is returned:
remote:
remote: From server.net:chris/heartbeat
remote: c0df678..5378ade master -> origin/master
remote:
remote: *** Please tell me who you are.
remote:
remote: Run
remote:
remote: git config --global user.email "[email protected]"
remote: git config --global user.name "Your Name"
remote:
remote: to set your account's default identity.
remote: Omit --global to set the identity only in this repository.
remote:
remote: fatal: empty ident name (for <[email protected]>) not allowed
When running git config -l from the git user:
user.name=server
[email protected]
core.autocrlf=input
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
[email protected]:chris/heartbeat.git
branch.master.remote=origin
branch.master.merge=refs/heads/master
I don't understand why it's still thinking that my user.email and user.name are empty as git config -l tells me it's not. Does anyone know a solution/workaround for this problem?
To make sure this work, a git config --local -l
needs to return the user name and email.
If it doesn't, go to that repo on the server, and type;:
git config user.name server
git config user.email [email protected]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With