git username/email not found by gitit #307

Open
maerten opened this Issue Jul 31, 2012 · 13 comments

Comments

Projects
None yet
9 participants

maerten commented Jul 31, 2012

Hi,

I get this error when starting gitit, and also when trying to create a front page:

Server error: UnknownError: Could not git commit Front Page.page

*** 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 'xxxxxxxxx@xxxxxxx.(none)')

My git username and email are present in ~/.gitconfig.
OSX 10.7.4
GHC 7.4.2
cabal-install 0.14.0

Owner

jgm commented Aug 7, 2012

Odd. If you use git in your repository, does it give the
correct user name and email in the log message?

What OS are you running?

+++ Maarten [Jul 31 12 16:24 ]:

Hi,

I get this error when starting gitit, and also when trying to create a front page:

Server error: UnknownError: Could not git commit Front Page.page

*** 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 'xxxxxxxxx@xxxxxxx.(none)')

My git username and email are present in ~/.gitconfig.


Reply to this email directly or view it on GitHub:
#307

maerten commented Aug 8, 2012

Hi

I'm using:
OSX 10.7.4
GHC 7.4.2
cabal-install 0.14.0 (installed via homebrew)
git version 1.7.11.1 (homebrew)

When i do 'git config -l' in the wikidata repository it shows me the correct username and email.

This is what happens when i make the first commit in the wikidata repo:

$ git show
fatal: bad default revision 'HEAD'

$ git show HEAD
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions

$ git add Front\ Page.page

$ git ci -m "added frontpage"
[master (root-commit) c6a0fd4] added frontpage
1 file changed, 1 insertion(+)
create mode 100644 Front Page.page

$ git log -1
commit c6a0fd4de090855be976fc65f86fdcd709d0100e
Author: Maarten xxxxxxxxxxxxxx@gmail.com
Date: Wed Aug 8 12:02:22 2012 +0200

added frontpage

I don't actually use gitit anymore on my mac, since it works fine on ubuntu. But i'm here to help if you have any questions about this problem!

posativ commented Sep 26, 2012

I have the same issue on Debian Squeeze. I have set my name in the git's global configuration. When I run gitit the second time, it stucks at templates/footer.st

$ gitit
Created static/css/custom.css
Created static/img/logo.png
Created templates/footer.st
^C

My system:

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.4.1
$ cabal --version
cabal-install version 0.14.0
using version 1.14.0 of the Cabal library 
$ gitit --version
gitit version 0.10.0.1 +plugins
Owner

jgm commented Sep 27, 2012

It's not stuck. It's running. Go to http://localhost:5001/

+++ posativ [Sep 26 12 14:54 ]:

I have the same issue on Debian Squeeze. I have set my name in the
git's global configuration. When I run gitit the second time, it stucks
at templates/footer.st
$ gitit
Created static/css/custom.css
Created static/img/logo.png
Created templates/footer.st
^C


Reply to this email directly or [1]view it on GitHub.
[J6T91GIPIyhU-8ti4GCGP7AlC2fiocPKodp06RQqyLxf_n8-T9xmCo6BNn_PjbqF.gif]

References

  1. #307 (comment)

posativ commented Sep 27, 2012

My fault. I expected more feedback.

Same error for me:

Server error: UnknownError: Could not git commit Front Page.page

*** 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 'pankajm@pankaj_y9402.(none)')

jotrk commented Mar 16, 2013

I get this error too, on a very recent Arch Linux system:

$ ghc-pkg list gitit
/usr/lib/ghc-7.6.2/package.conf.d
/usr/local/cabal/.ghc/x86_64-linux-7.6.2/package.conf.d/
gitit-0.10.3
$ git --version
git version 1.8.1.5

This not only happens for the initial commit, but also for changes through the web interface. This makes gitit kind of unusable.

Alright, the problem lies in Data.FileStore. I'm going to add a bug report there.

Prelude Data.FileStore> let fs = (gitFileStore "/tmp/test") 
Prelude Data.FileStore> initialize fs
Prelude Data.FileStore> create (gitFileStore "/tmp/test") "/tmp/test/test.txt" (Author "foo" "bar") "description" "content"
*** Exception: UnknownError: Could not git commit /tmp/test/test.txt
*** Please tell me who you are.
[..]

I have the same problem! Solution?

refried commented Dec 20, 2014

It's because your system doesn't have a local domain set. The system is returning "(none)" (as in 'xxxxxxxxx@xxxxxxx.(none)') which git rejects as a domain when it tries to autodetect an email address: "username@hostname.domain"

You might be able to fix it on your router or DHCP server like I did, or you can manually set the email address using the commands that git is telling you.

maerten commented Dec 20, 2014

Shouldn't gitit be able to get the emailaddress from the users' local ~/.gitconfig?

refried commented Dec 20, 2014

Yeah I guess so. Did you run the git commands it showed?

You have to set in your repo:

$ cd wikidata/
[xan@negre wikidata]$ ls
Front Page.page
[xan@negre wikidata]$ git config --local user.email "xan@localhost"
[xan@negre wikidata]$ git config --local user.name "Xavier"

LOL))
just run in cmd.exe :
git config --global user.email "you@example.com"
git config --global user.name "Your Name"

EXAMPLE:
git config --global user.email "ge*****gmail.com"

git config --global user.name "Fedor Emelianenko"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment