Can the owner of a repo see clones?

大憨熊 提交于 2020-11-30 03:51:51

问题


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?


回答1:


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, you can't see that. 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.




回答2:


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:

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.




回答3:


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




回答4:


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




回答5:


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!




回答6:


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


来源:https://stackoverflow.com/questions/20927871/can-the-owner-of-a-repo-see-clones

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!