Reporting on 'git clone'

Is there a way to produce a report on who has done a 'git clone' against a repo?

1 answer

Hi Jennifer,

Not currently, and honestly it's not likely a UI feature that we're likely to add any time soon. However the data is certainly available to you in the atlassian-stash-access logs. Here is some documentation around the log format:

https://confluence.atlassian.com/display/STASHKB/Stash+Log+Formats

And if you're interested my manager has written this very handy tool to show the number of fetch, clones and pushes on a Stash instance over time. (Be warned it's written in Haskell - but there a binary downloads if you just want to run it)

https://bitbucket.org/ssaasen/stash-log-parser

Let me know if you need any more help parsing those logs.

Cheers,

Charles

Thank you, Charles

Any chance having the logparser packaged for Windows?

Hi Charles,

Reviewing the log files, I'm seeing a large number of ...."POST/scm/mob/xyz.git/git-upload-pack HTTP/1.1" | "" "JGit/2.3.1.201302201838-r" | clone, cache:hit | <or cache:miss> ...

As well, as a few:

"GET /s/en_US-1988229788/0df130c/3/2.0.0/_/download/resources/com.atlassian.stash.stash-sourcetree-plugin:stash-sourcetree-resources/sourcetree-clone-bg.png HTTP/1.1"

What is the difference between these two line entries?

Thanks much,

Jennifer

Hi Jennifer,

The first is someone doing a clone of the xyz repository from Stash.The latter is a browser requesting the sourcetree png image which would most likely happen on a repository page where we show the clone button.

Cheers,

Charles

Hi again,

Are you asking what GET/POST means? That's part of the HTTP specifaction. GET is an operation that is asking the server for something, usually a file or data. The browser uses GET to fetch the HTML of a page for example. POST is usually an operation to submit data to the server, which you will see for both push and clone. Even though clone is reading data from the server, it has to submit a list of changesets that it is interested in downloading, which is why it's a POST and not a GET.

Does that help?

Charles

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 06, 2018 in Bitbucket

Do you use Bitbucket Cloud and Jira Cloud? If so, let us know!

Hi Community, I'm Julia and I'm on the Jira Software Cloud marketing team!  We're looking for companies or teams using Bitbucket Cloud and Jira Software Cloud. If your team fits the t...

174 views 6 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you