---
title: "git提交的时候如果遇到does not match your user account"
author: "hellojava"
date: "2016-11-30T12:15:19Z"
tags: []
categories: ["互联网"]
slug: "git-does-not-match-your-user-account"
draft: false
lastmod: "2016-11-30T12:15:47Z"
id: 2342004
url: "https://hellojava.iteye.com/blog/2342004"
---

git提交的时候如果遇到does not match your user account

![](http://dl2.iteye.com/upload/attachment/0121/6155/a01ce072-32ee-3d42-b039-3dc70aa6db2e.jpg)  
 

除了使用下面的命令重新设置账号以外

`git config --global user.name "Your Name"`

`git config --global user.email you@example.com`

还需要

git commit --amend --reset-author

否则是不会有效果的

 

当然，如果能在Gerrit里面进行配置，配置 'Forge Committer' 和 'Forge Author' 访问权限也是能够解决的。