Git公开暴露我的电子邮件地址吗? [英] Does Git publicly expose my e-mail address?

查看:188
本文介绍了Git公开暴露我的电子邮件地址吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Git上读过的指南说,我应该进入配置并指定我的名字和我的电子邮件地址。他们没有详细说明;他们只是说要这样做。



为什么Git需要我的电子邮件地址?而且,更重要的是,如果我通过GitHub公开提供我的repo,例如,我的电子邮件地址是否可以被所有人看到(包括垃圾邮件)? 方案

Git使用您的电子邮件地址来识别您以及执行其他任务(例如使用GPG密钥对标记进行签名)。您的电子邮件地址与您指定的名称一起作为您的身份的一部分嵌入到提交日志等中。例如,提交日志中的author字段将显示为:

 作者:Joe White< joewhite @ mysite .COM> 

因此,任何拥有repo副本的人都可以获得这些信息,因为它充当标识符。但是,除非使用Gitweb或GitHub之类的服务,通过网站使您的回购可用,否则您的电子邮件可能不会被垃圾邮件所看到接口(只是把它放在互联网上不这样做)。



我想你可以填写一个虚假的电子邮件地址或使用空字符串或(我不认为Git检查电子邮件的格式或有效性),但是如果有人克隆回购需要发送补丁或以某种方式与您联系,那么该电子邮件非常有用。


The guides I've read so far on Git say that I should go into the config and specify my name and my e-mail address. They don't elaborate; they just say to do it.

Why does Git need my e-mail address? And, more importantly, if I make my repo publicly available, via GitHub for example, will my e-mail address be visible to everyone (including spambots)?

解决方案

Git uses your email address to identify you, as well as do other tasks (such as sign a tag with a GPG key). Your email address does get embedded as part of your identity in commit logs, etc., along with the name you specify. For example, the "author" field in a commit log would show up as:

Author: Joe White <joewhite@mysite.com>

So the information is available to anyone with a copy of the repo, since it acts as an identifier.

Your email probably won't be visible to spambots, though, unless you use Gitweb, or a service like GitHub, to make your repo available through a web interface (merely putting it on the Internet doesn't do this).

I suppose you could fill in a fake email address or use an empty string or space or something (I don't think Git checks the format or validity of the email), but the email is useful if someone who clones the repo needs to send you a patch or contact you in some way.

这篇关于Git公开暴露我的电子邮件地址吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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