I am currently testing out stash and I came across an issue where I download Sourcetree and set my credentials (Name and email) for the use of having a Author on commits. Every time I commit, it shows my author as 'unknown<mycomputername>'. I looked up this issue and it seems like one other person came across this, but was able to solve it by reentering their data under Tools-> Options. The only way I can fix this issue is by going to Repository -> Repository Settings -> Advanced and unclicking 'Use global user settings'. Can anyone explain to me the source for this issue? Is there a way to prevent this from occurring?
I'm no Sourcetree guru, but it seems like you did everything right initially.
You should be able to set your username and email globally for git through the command line though.
git config --global user.name "Jennifer Connor" git config --global user.email "your@email.com"
At least this way you'll be spared from needing to do this for each repo.
Aseem, I appreciate this response. I decided to try using git command line and it has worked quite well. It has also solved the issue with SourceTree so I will recommend users go with this approach during their setup.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jen, I'm glad it worked out so well for you. Always happy to help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Worked like a charm. Thanks a ton.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
just fixed my problem at work today, thanks :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Another option is to edit the file:
C:\Users\<Username>\AppData\Local\Atlassian\SourceTree\git_local\etc\gitconfig
a hidden folder by default...
Add the lines:
[user] name = <My Name>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have the same problem, but the accepted solution does not work for me. Neither does the workaround of the original poster.
Problem: When pushing unknown<mycomputername> is used.
remote: refs/heads/Feature-QCP-1055-plq-40k-80k-refactored: 96374b247370a007554fb59efbf4b85526c27bb0: expected committer email 'firstname.lastname@capgemini.com' but found 'shortname@computername'[K remote: refs/heads/Feature-QCP-1055-plq-40k-80k-refactored: 96374b247370a007554fb59efbf4b85526c27bb0: expected committer name 'firstname lastname' but found 'unknown'[K
The author name and e-mail is configured in Tools -> Options -> General.
In Repository -> Repository Settings -> Advanced it does not matter if 'Use global user settings' is checked or not.
Using Sourcetree version 1.6.5.0 with embedded GIT 1.8.3.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had a similar error after updating Sourcetree, and updating the git.config (global, local and system) to the correct user name and email didn't help. It turned out that the commit that I wanted to push had been made with the wrong name and email, so the remote wouldn't accept it. Running git commit --amend --reset-author fixed the problem once the correct information was in the config file (or in the Sourcetree options, which are equivalent).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much. I was struggling with this for hours and this was the answer.
So, setting user and email in the Advanced window on Repository Settings and after that deleting local master branch and checking it out again was solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.