When committing database changes with Git, you may encounter the following error:
Author identity unknown
This error occurs because Git cannot recognize your name and email address. Git requires you to configure these values to associate commits with a valid identity.
The Author Identity Unknown issue might also trigger related 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 the issue, configure your Git identity by running the following commands in the command line or terminal. Replace "[email protected]"
and "Your Name"
with your actual email address and name.
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
These commands set the identity globally, applying to all Git repositories on your system.
Tip
To configure the identity only for the current repository, omit the
--global
flag and run the same commands inside the repository directory.
To confirm that the configuration is set correctly, run the following commands:
git config --global user.email
git config --global user.name
The output should display the email and name you just configured. After that, you can commit your changes without encountering the error.
1. Link the BikeStores database to the remote Git repository.
2. Modify the dbo.Orders table.
3. Refresh Source Control Manager.
4. In the Local changes section, select the change, add a comment, and click Commit.
The Commit window opens and begins the commit operation.
At the Checkin stage, the operation fails with the Author identity unknown error.
The Error List pane displays the error message and suggests how to fix it.
1. Close the Commit window by clicking OK.
2. Open Command Prompt.
3. Navigate to the folder containing the repository linked to your database.
4. Run the following commands:
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
Note
Replace the placeholders with your actual email address and username.
You can open the Git configuration file to confirm that the values were saved.
1. Return to Source Control Manager and refresh it.
2. After the refresh operation completes, click OK to close the window.
3. In the Local changes section, select the pending changes, then click Commit.
The Commit window opens and shows the operation progress.
The commit succeeds, and the changes are applied to the remote repository without errors.