Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

git username/email not found by gitit #307

Open
maerten opened this Issue · 12 comments

8 participants

@maerten

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

@jgm
Owner
jgm commented
@maerten

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

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
@jgm
Owner
@posativ

My fault. I expected more feedback.

@pankajmore

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

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.
[..]
@liujiaqiid

I have the same problem! Solution?

@refried

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

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

@refried

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

@somenxavier

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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.