Reputation: 324
We have an in-house TFS 2013 update 4 on Windows Server 2008 R2 Standard (TFS server), with Git version 2.5.0.windows.1.
Our TFS build process uses InvokeProcess activity to call Git from a batch file.
These are the calls to git we make from the batch file (in two lines for debugging purposes):
call git submodule init
call git submodule update
It is the second line that is giving me a problem, as shown below:
When I run the same batch file on the server manually (even from non-admin cmd.exe), all executes as expected, i.e. I am not prompted for any usernames or passwords.
We are currently using wincred as our credentials helper, having tried:
Interestingly, Microsoft.TeamFoundation.Build.Activities.Git.GitPull has no problems cloning the superproject, but if I was to prompt Git to clone and pull via a batch file, I am getting the same "fatal: could not read Password" error.
Unfortunately, we do not have an option of upgrading to TFS 2015, where loading submodules is apparently a matter of ticking a check-box. Including username and password as part of the command in plain text is not an option either.
What do I need to try/do to allow Git to read the required Password using wincred? All thoughts and suggestions will be much appreciated...
Upvotes: 1
Views: 757
Reputation: 324
The main problem was the fact that our TFS Build service was running under NETWORK SERVICE account, as opposed to the account which I was entering passwords for.
Steps that I took towards the solution (as alternative to using TFS Admin Console):
A few more points worth checking:
Hope this helps somebody with the same issue!
Upvotes: 2