How to resolve the Git issue - Author identity unknown

When version-controlling a database in Git and trying to commit changes to the repository, you might encounter the error message Author Identity Unknown. This issue occurs because Git cannot recognize your email address and author identity and requires you to set a username and email address for commits in your Git configuration.

Furthermore, the Author Identity Unknown issue might trigger other errors, such as:

  • error: pathspec ‘< path >’ did not match any file(s) known to git
  • error: pathspec ‘011’ did not match any file(s) known to git

Note

Resolving the Author Identity Unknown issue is likely to address these associated errors as well.

To resolve this issue, you need to open the command line or terminal and run the following commands, replacing "you@example.com" with your email and "Your Name" with your username:

git config --global user.email "you@example.com"
git config --global user.name "Your Name"

These commands will set your username and email address as the default identity for all your Git repositories.

Note

If you want to set them for the current repository, navigate to your repository directory in the command line and run the same commands without the --global flag.

To ensure proper configuration, run the following commands:

git config --global user.email
git config --global user.name

These commands should display the name and email you’ve just set. After that, you can commit the changes.

Let us now consider the example, which will illustrate the issue and its resolution. We’ll begin by linking the BikeStores database to the bikestores remote Git repository. Then, we’ll make the changes to the table and try to commit them without the username and email specified in Git configuration.

Example

1. Link the BikeStores database to the remote Git repository.

2. Modify the dbo.Orders table and refresh the Source Control Manager.

3. In the Local changes section, select the change, add a comment, and click Commit.

Modify the table

4. The Commit window opens, displaying the stages of the commit operation. At the Checkin step, the operation fails with the Author identity unknown error.

The Error List pane opens, showing the description of the error and the way to resolve it.

Error message in the Error list pane

Click OK to close the Commit progress window.

5. To resolve the issue, open the command prompt and navigate to the folder with the repository to which the database is linked.

6. In the command prompt, execute the following commands:

git config --global user.email "you@example.com"
git config --global user.name "Your Name"

Note

Replace "you@example.com" with your email address and "Your Name" with your username.

Fix the issue

If we open the configuration file, we’ll see that data has been inserted.

Added username and email to the configuration file

7. Go back to the Source Control Manager and refresh it. After the refresh operation is complete, click OK to close the window.

8. In the Local changes section, select the changes and click Commit. The Commit progress window opens, showing the stages of the operation.

Rerun the operation

Now, the operation succeeded, and the changes have been committed to the remote repository without error.

Resolved issue

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Source Control for SQL Server.
All Features

All features

Get acquainted with the rich features and capabilities of the Source Control in less than 5 minutes.
Request a demo

Request a demo

If you consider employing the Source Control for your business, request a demo to see it in action.
Ready to start using dbForge Source Control for SQL Server?