title: running git from java, git prompts for user name and password, why?
body: <p>I'm putting together a tool to automate some of my git tasks, but I'm running into a problem where "git commit" prompts for user name and password.
  I can do git add, rm, status ok, but not commit.
  This is running git via <code>Runtime.exec()</code> from java.</p>
  
  <pre><code>Runtime.getRuntime().exec("git " + cmd, new String[0], mDir);
  </code></pre>
  
  <p>My current test is on MS Windows.  running git commit from the command line works just fine.  Only when running via the <code>exec()</code> call does it prompt for user/password.</p>
  
  <p>I did do the git config --global to set both user name and password previously.</p>
  
  <p>So, why is it prompting me?</p>
  
  <p>--Added 2/13</p>
  
  <p>This is with a local git directory, not using a remote repository.
  Okay, here is the exact error msg that GIT is reporting to me:
   git commit -F -</p>
  
  <pre><code> *** 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.
  </code></pre>
  
  <h2>     fatal: unable to auto-detect email address (got 'Cougar@COUGAR-HOUSE.(none)')</h2>