'Author identity unknown' error when trying to publish to Github

Answered

I was following a tutorial, and when I reached the step to commit to GitHub, I got a popup error message titled “Can't finish GitHub sharing process”, with the following message:

Successfully created project 'tyls-progression-overhaul-1.0-1.20.1-forge' on GitHub, but initial commit failed:
Author identity unknown
*** Please tell me who you are.
Run
  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got '[my laptop username]@[my name]Laptop.(none)')

I found a guide for this issue here, but don't know how to find the folder with the repository in step 5. I'm not especially experienced with this, and don't have GitHub installed on my laptop.

How can I find the folder with the repository, or is there something else I need to do?

0
2 comments

In the console I noticed the line Initialized empty Git repository in C:/Minecraft/tyls-progression-overhaul-1.0-1.20.1-forge/.git/ near the top. Following it, I found the hidden folder “.git” containing (among other files and folders) a file with no extension called "config" containing the following:

[core]
	repositoryformatversion = 0
	filemode = false
	bare = false
	logallrefupdates = true
	symlinks = false
	ignorecase = true
[remote "origin"]
	url = https://github.com/TomsYaLad/tyls-progression-overhaul-1.0-1.20.1-forge.git
	fetch = +refs/heads/*:refs/remotes/origin/*

Would this folder be where I have to select to execute the commands?

0

Yes, this is the file where you can enter the user.name and user.email configuration.

However, it is easier to do it from the command line (e.g. git bash). Navigate to the project directory: C:/Minecraft/tyls-progression-overhaul-1.0-1.20.1-forge/ (not the .git one) and run the following commands:

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

Replace the name and email values with your own information.

Also, you can run the following commands to configure the username and email globally on your machine. So that you do not have to set it up everytime for each new project/repository.

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

Please sign in to leave a comment.