Can the owner of a repo see clones?

GithubClone

Github Problem Overview


I know that the owner of a repo is able to see a fork request when one is performed. But what about a clone? Can the owner of the repo see when someone clones it?

Github Solutions


Solution 1 - Github

The question is too general, but let me answer the question as it stands now.

> Can the owner of the repo see when someone clones it?

No, they cannot. If I go to one of your repositories and clone it to my local hard drive, the owner will not be able to view that activity. And why would you want to? Likely there are many clones of your repository.

Know that clones can live on other systems than GitHub.

Now, will the owner know that someone forked their repository on GitHub itself?

Yes, they will, assuming they pay attention.

I did the following:

  1. Logged in as my main account
  2. Created a repository
  3. Set up a new dummy-account on an alternate email address
  4. Forked the repository I created earlier
  5. Logged back into my main account

This is what I see on my first page after logging in:

fork notification

If I do the following:

  1. Click on my repository

  2. Click on the small 1 to the right of the "Fork" button:

    fork button after forking

  3. Click on the "Members" tab:

    members tab

  4. Then I see this:

    content of members tab

Conclusion:

Yes, the owner of a repository will see when someone makes a fork on GitHub, but no, they will not see it when someone makes a clone somewhere else.

Solution 2 - Github

As far what I found you CAN'T know when someone clones it (if you mean exact time) nor who cloned it. But you can know how many clones were made on which date and the number of unique cloners from ths url.

https://github.com/{usernamme}/{reponame}/graphs/traffic

Insights tab:

enter image description here

However one thing I find fishy is unique cloners is more than unique visitors, how can someone decide to clone even without visiting the repo. I guess it may be bots in such cases.

Solution 3 - Github

You can use clone graph on GitHub to find out how many times your repository's source code is actually cloned in a given day. More information can be found here https://help.github.com/articles/about-repository-graphs/#traffic

Solution 4 - Github

Yes, it can be done.

  1. Go to your account landing page- https://github.com/yourusername
  2. Click on the repo you want to check traffic for.
  3. Click on Insights on top navigation bar.
  4. Click on Traffic on left navigation bar.

Voila, you will get your traffic including no of clones with a timeline.

Reference: clone graph

Solution 5 - Github

Open Github, find your repo, click on it. Then click on Insights and finally click on Traffic. Github shows a graph Traffic including git clones. Salutes!

Solution 6 - Github

as long as you have access to the repo, aka an ssh key on the filesystem with the remote, then yes. you would do as follows:

git fetch some_remote
git log some_remote/some_branch

Solution 7 - Github

As for now we can obtain this information with Rest API /audit-log, but it is available only for Enterprise users with org:read permission. We can see the actual users that have preformed fetch, clone and many more actions.

https://docs.github.com/en/rest/reference/orgs#get-the-audit-log-for-an-organization

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestiongoodcowView Question on Stackoverflow
Solution 1 - GithubLasse V. KarlsenView Answer on Stackoverflow
Solution 2 - Githubishandutta2007View Answer on Stackoverflow
Solution 3 - GithubKosy AnyanwuView Answer on Stackoverflow
Solution 4 - GithubKunalView Answer on Stackoverflow
Solution 5 - GithubMartin M.View Answer on Stackoverflow
Solution 6 - GithubJed SchneiderView Answer on Stackoverflow
Solution 7 - GithubYaron AvitalView Answer on Stackoverflow