如何在提交中阻止错误的用户名和电子邮件 [英] how to block false user name and email in commits

查看:51
本文介绍了如何在提交中阻止错误的用户名和电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想阻止服务器中具有错误用户名和电子邮件的那些提交. 认证是通过ssh进行的.目前,我可以将config user.name和user.email更新为我的以外的其他东西,并且仍然提交并推送到中央存储库.现在,历史记录显示有关提交者的错误信息. 有什么想法,我们如何防止这种情况发生?

i want to block those commits in the server which has false user name and email. The authentication is via ssh. It is currently posible for me to update the config user.name and user.email to something other than mine and still commit and push to central repo. The history now shows wrong information about committer. Any ideas, how we can prevent this?

推荐答案

您需要将ssh密钥与电子邮件相关联,并拒绝具有不同电子邮件的提交.

You will need to associated the ssh key with an email and deny commits that have a different email.

这篇关于如何在提交中阻止错误的用户名和电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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