Git/gitosis: How to check validity of user name and email? -


I have installed git and gitosis and I need to add a check that the username is valid when pushed in some repositories goes .

I think the pre-received hook is the right hook for this place, but I have a real user name and email address that enters the Gitos repository (GIT config user .name and git config user.email ) Environmental variables from Both LOGNAME and USER are 'GIT', how do GTOsis detect this information and can I get it in the pre-received hook?

hmm, pre-fetch what I collect from the hook , It is fed to the updated riff on stdin .

  #! Read / Bin / sh old new names; Email = $ (git log -1 - meaning = format:% ae $ new) # Checked email  

You have to check the email address (can be more than one data Line) and exit the script accordingly, i.e. exit 0 and exit 1 for failure for example.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -