一、问题
在vercel部署nextjs项目时,报错A commit author is required
,如图所示:
github的部署也报错:No GitHub account was found matching the commit author email address
二、原因
提交commit时候的邮箱未绑定到github中去。
三、解决方案
解决方案有两种:
- 修改commit的邮箱为已经绑定到github的邮箱
- 在github上绑定commit的邮箱
受限通过git log
命令查看当前commit的邮箱:
Author列会展示当前提交的用户及邮箱,将邮箱登记到githb中去(位于Settings - Emails - Add email address):
或者通过命令修改git的用户和邮箱,邮箱要和github中绑定的一致:
git config --global user.name "username"
git config --global user.email "username@email.com"
然后就可以正常部署了:
此处评论已关闭