检测 GitHub 提交的 IP 地址 [英] Detect IP address of GitHub commit

查看:79
本文介绍了检测 GitHub 提交的 IP 地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一些公司 github 存储库的所有者.最近,我们怀疑一个开发人员可能通过他借用的 github 身份(许多凌晨 4 点分批提交)寻求外包帮助.github.com上有没有办法确定提交者的源IP地址?在流量页面上,我可以根据唯一克隆的数量推断此信息,但这不足以让我们验证我们的担忧.

i'm the owner of a few corporate github repositories. Lately we have been suspicious of a developer who may be enlisting outsourced help through his borrowed github identity (many 4am commits in batches). Is there a way on github.com to determine the source IP address of the committer? On the traffic page i can infer this info based on teh number of unique clones, but this is not enough data for us to validate our concerns.

干杯,乔无名

推荐答案

如果这个个人",如果我引用你的公司是对的,让他的分包商以他的名义承诺他们的官方回购,而无需采取进一步的预防措施,那么他是个白痴,应该被解雇.

If this "individual", if I'm quoting your corporatese right, lets his subcontractors commit themselves to the official repo in his name without further precautions, then he is an idiot and deserves to be fired.

在这种情况下,您可能甚至不需要提交者的 IP 地址.提交本身包含一些非常有用的数据:

In this case, you probably don't even need the committer's IP address. The commit itself contains some very useful data:

git cat-file -p <suspicious-commit-id>

将显示整个提交对象.它将包含如下两行:

Will show the entire commit object. It will contain two lines like this:

author Foo Bar <foo@bar.com> 1398017575 +0200
committer Foo Bar <foo@bar.com> 1398017575 +0200

如您所见,Unix-epoch 时间戳后面有时区信息.如果您在美国东海岸,您应该会看到类似 -0500 的内容.如果分包商在印度,您会看到 +0630 或类似的字样.

As you can see there is timezone info following the Unix-epoch timestamps. If you're on the East Coast in the USA, you should see something like -0500. If the subcontractors are in India, you'll see +0630 or something like that.

个人"可能比这更有意义.所以分包商推送到他的回购,然后他重写历史并推送到官方回购.在后一种情况下,祝你好运.

The "individual" has probably more sense than that. So the subcontractors push to his repo, then he rewrites history and pushes to the official repo. In the latter case, good luck.

这篇关于检测 GitHub 提交的 IP 地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆