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.
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.
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.
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.
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.