Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 316767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:24:50+00:00 2026-05-12T08:24:50+00:00

I need to set up a centralized git repository for a large team of

  • 0

I need to set up a centralized git repository for a large team of in-house developers.

I need some convincing mechanism that allows me to trace a given commit back to a user. As I understand from this question, this will probably not be the actual git-authors. I do not expect to be using this information for anything (other than satisfying in-house requirements for traceability). Relating a commit to the client’s IP adress is considered reliable enough, so it’s not really strict. Grepping log-files would be acceptable, but I am expecting fairly concurrent commits.

Any suggestions how I can achieve this ? I am deliberately trying to be open-ended as to solution type (ssh, git-server, apache) here

(And yes, if “joe” pushes changes he fetched from “osama”, then joe will read this code before commiting)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T08:24:50+00:00Added an answer on May 12, 2026 at 8:24 am

    You could achieve this through a post-receive hook. This example hook just echos back possible details that could be logged to the pushing user, but the details could be logged via syslog or a dedicated loggin mechanism of some kind.

    # sample logging post-receive hook
    
    echo This hook logs back to the pusher, but could append to syslog or something.
    echo push from user $LOGNAME at $(date), ssh client details: $SSH_CLIENT
    
    echo refs updated:
    echo -------------
    cat
    echo -------------
    

    For the SSH_CLIENT details to be accurate, you probably want to ensure that users don’t have direct shell access as otherwise they could get a shell via ssh, then spoof their LOGNAME and SSH_CLIENT info, although such fudging would be malicious and giving malicious users push access to a git repository is inherently dangerous. There are more reliable ways to determine the users identity but if the user has control over there login scripts then, as the hook is run as the logged in user, there is always the possibility that they can manipulate it in a way to subvert how the hook works.

    This way you get the from and to commit SHA1 for each branch changed. In order to ensure that you can always easily examine the history you probably also want to make sure that the config variables receive.denyDeletes and received.denyNonFastForwards are set to true. Again, to deny fiddling with these configs, you want to avoid users having shell access to the repository.

    If you don’t mind about non-fast forwards or branch deletes, you can still access old commits that haven’t been pruned through the reflogs, so long as these are enabled via the core.logAllRefUpdates.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 162k
  • Answers 163k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Names like "Tue" and "Sep" are English. Other languages use… May 12, 2026 at 12:06 pm
  • Editorial Team
    Editorial Team added an answer Use two stacks. One is the data, one is the… May 12, 2026 at 12:06 pm
  • Editorial Team
    Editorial Team added an answer The lack of a script is due to an issue… May 12, 2026 at 12:06 pm

Related Questions

I have a class that manages user preferences for a large software project. Any
I work at a small LAMP Development Studio where the idea has been to
We are going to be selling a service that will be hosted by us,
I need to set up a test environment on my XPSP3 machine that runs
I need to set up a proxy with authentication to verify the behavior of

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.