Problem with Git submodules

Hello,

we have some nasty problems with Git submodules and ContinuaCI. Whenever we have changes made in a submodule repo and adjust the submodule owner to that new changeset, ContinuaCI has problems to catch up with that.

The error message is

A new event has been added to the event log:
Repository

Cannot get changes for repository PowerHausGit: Running ‘C:\Program Files\Git\cmd\git.exe’ with arguments “-c credential.helper= -c credential.helper=”!"C:\Program Files\VSoft Technologies\ContinuaCI\Server\Continua.Git.CredentialsHelper.exe" --key {somesecretkey}" fetch --prune --all" failed with return code 1 and error output: "Fetching origin

bash.exe: warning: could not find /tmp, please create!
bash.exe: warning: could not find /tmp, please create!
From https://dev.azure.com/{themainrepo}
fced202…52c1a76 master → origin/master
Fetching submodule lib/{subrepo}
bash.exe:**********@dev.azure.com/{thesubrepo}': No such file or directory
bash.exe: warning: could not find /tmp, please create!
bash.exe: warning: could not find /tmp, please create!
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Password for ‘https://powerhaus@dev.azure.com/{thesubrepo}’: No such file or directory
Errors during submodule fetch:
lib/{subrepo}
lib/{subrepo}
error: Could not fetch origin
"

We have to reset the repository in ContinuaCI (sometimes twice) to get it working again.

Version 1.9.2.509

What are we missing?

Hi Uwe,

This appears to be an issue with the Git client installation on the server. Upgrading or reinstalling Git for Windows may fix the issue.

Also check that the folder C:\Program Files\Git\tmp exists on the server - if not create it. See bash.exe: warning: could not find /tmp, please create - Stack Overflow

Otherwise, it may be due to an issue with environment variables. Check that the TMP and TEMP environment variables are both set to %USERPROFILE%\AppData\Local\Temp. Note that this needs to be done while logged in as the Continua CI Server service user. See git fetch - bash.exe: warning: could not find /tmp, please create - Stack Overflow.

Thanks for the suggestions. Unfortunately we are still not able to get it working.

We tried creating that /tmp folder on different ways, but could not make the error vanish. Logging it with the Continua user account is difficult as it is started as Local System (I already argued here that being a bad idea in the first place).

While resetting the repository made it work somehow when the main branch affected, I cannot make it work now where the submodule change is only in a feature branch.

I am out of ideas in the moment and pressure is high to drop the submodule approach completely, which would be a major step back.

Update: We somehow managed to get it working again. Not sure what actually caused it.

As we will have another branch requiring a submodule change shortly, we will see if the error persists.

Hi Uwe,

We certainly do not recommend using Local System as the Log On account for the CCI server service (it’s dangerous). We recommend setting up a dedicated domain account with the required permissions and using this instead. The service installer actually requires that the account is specified as domain\user.

image

As Local System does not have a user profile, you are likely to have problems running command-line tools such as git.

You can change Log On account for the server service, either directly in Services or by running the CCI installer and specifying that you want to update existing settings.

Can we switch to PM with that? I am not very keen to post some error message or logs here in public.

You can pm Dave or email to support @ finalbuilder.com.

Give that we do not officially support running the service under Local System (because as Dave pointed out, some tools will have issues due to the lack of a user profile) there’s probably not much we can do to fix this. You really need to run the service under a domain user.

Yes, we already changed the user, but the problem persists. I sent a message to Dave with the error message.