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 Runtime.exec() from java.
Runtime.getRuntime().exec("git " + cmd, new String[0], mDir);
My current test is on MS Windows. running git commit from the command line works just fine. Only when running via the exec() call does it prompt for user/password.
I did do the git config --global to set both user name and password previously.
So, why is it prompting me?
--Added 2/13
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 -
*** Please tell me who you are.
Run
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
gitwill look atuser.passwordby default. It's probably using SSH keys when run at the command line but the environment is different when usingexec.