Gitmails – An Information Gathering Tool To Colect Git Commit Emails In Version Control Host Services

0
102
Gitmails – An Information Gathering Tool To Colect Git Commit Emails In Version Control Host Services

An information gathering instrument to colect git commit emails in version control host providers.

Overview
Gitmails explores that git commits accommodates a reputation and an electronic mail configured by the creator and that model management host providers are getting used to retailer plenty of initiatives.
What Gitmails does is:

  • Query the model management host providers for details about a corporation, staff, group, person or single repository;
  • List all repositories (restricted by authentication) if not on single repository mode;
  • Clone the repository or question the model management host service for the commit historical past;
  • Analyze the commit historical past to determine distinctive authors. Authors are outlined by a reputation and electronic mail par.

With these steps, Gitmails can accumulate all emails present in commit historical past for a selected goal.

Usage
First, you need to select the operation technique: accumulate emails of group, person or single repository. This might be performed by the choices: -u --username, -o --organization or -r --repository.
After specifying the operation technique, you need to set the goal. You ought to cross it proper after the operation technique: python3 gitmails.py -u some_username, python3 gitmails.py -o some_org or python3 gitmails.py -r some_repo_url. NOTE: gitlab usernames are case delicate, maintain that in thoughts when making an attempt to gather emails there.
With this primary configuration, Gitmails will clone all repositories for the required goal (or clone the repository within the url) and analyze its commit historical past. Then, it can print the excessive stage info of the person or group and at last print, in a “fancy_grid” desk (from tabulate), all of the Name-Email pars discovered throughout evaluation.
Useful choices:

  • --raw: Will print the leads to pure textual content, no grids, only a comma separated values;
  • -f | --file: Will retailer the consequence within the specified file. The outcomes might be in csv with no header format.
  • --include-repositories: Will make Gitmails print the consequence with details about by which repository the e-mail was discovered.
  • -p | --path: Specify the short-term path to clone the repositories.
  • -e | --exclude: Ignore specified repositories. Will examine the repository title, if it matches, will ignore the repository and go to the following.
  • --no-cleanup: Will not take away the clonned repositories.
  • --include-forks: Will embody forked repositories within the analysis (Only for github).
  • --include-customers: If gathering a corporation, will accumulate data about its public members (Only for github).
  • --no-[gitlab|github|bitbucket]: Will not accumulate info of the required host service.
  • --run-plugins: Will execute plugins within the collected consequence.
  • --api: Will attempt to accumulate all the knowledge solely via API, with out clonning repositories. NOTE: Accessing APIs with out authentication will trigger your IP to be throttled. Also, API solely assortment is often slower than clonning the repositories.

Installation
To set up Gitmails, you’ll have to execute the next steps:

  • pip3 set up -r necessities.txt
  • Install pygit2 via your working system package deal supervisor.

Debian issues
If you’re utilizing Debian (perhaps Ubuntu too), the libgit2 package deal don’t work with Gitmails. To remedy this, you will have to compile the libgit2 manually. The following steps ought to sufficient:

wget https://github.com/libgit2/libgit2/archive/v0.27.0.tar.gz && 
      tar xzf v0.27.0.tar.gz && 
      cd libgit2-0.27.0/ && 
      cmake . && 
      make && 
      sudo make set up
ldconfig
pip3 set up pygit2

Or execute the debian install script.

Docker
You may use the docker model of the instrument by issuing the next command:

docker run -it giovanifss/gitmails --help

Note that if you wish to write to a file, you will have to mount a docker quantity:

docker run -v /tmp/output:/choose -it giovanifss/gitmails -f /choose/consequence.txt

MoreTip.com

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.