# Problem with Git submodules

**URL:** https://www.finalbuilder.com/forums/t/problem-with-git-submodules/6988
**Category:** Bugs
**Created:** [February 17, 2021, 3:04pm UTC](https://www.finalbuilder.com/forums/t/problem-with-git-submodules/6988 "2021-02-17T15:04:26Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![uraabe](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/uraabe/32/2502_2.png) [@uraabe](https://www.finalbuilder.com/forums/u/uraabe)
#### Post date: [February 17, 2021, 3:04pm UTC](https://www.finalbuilder.com/forums/t/problem-with-git-submodules/6988/1 "2021-02-17T15:04:27Z")

</div>

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}](https://dev.azure.com/%7Bthemainrepo%7D)  
> 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}](https://powerhaus@dev.azure.com/%7Bthesubrepo%7D)’: 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?

---

<div class="post-metadata">

### Author: ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)
#### Post date: [February 17, 2021, 11:17pm UTC](https://www.finalbuilder.com/forums/t/problem-with-git-submodules/6988/2 "2021-02-17T23:17:30Z")

</div>

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](https://stackoverflow.com/questions/22492715/bash-exe-warning-could-not-find-tmp-please-create/22492765)

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](https://stackoverflow.com/questions/33836055/git-fetch-bash-exe-warning-could-not-find-tmp-please-create).

---

<div class="post-metadata">

### Author: ![uraabe](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/uraabe/32/2502_2.png) [@uraabe](https://www.finalbuilder.com/forums/u/uraabe)
#### Post date: [March 18, 2021, 12:32pm UTC](https://www.finalbuilder.com/forums/t/problem-with-git-submodules/6988/3 "2021-03-18T12:32:31Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![uraabe](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/uraabe/32/2502_2.png) [@uraabe](https://www.finalbuilder.com/forums/u/uraabe)
#### Post date: [March 18, 2021, 2:35pm UTC](https://www.finalbuilder.com/forums/t/problem-with-git-submodules/6988/4 "2021-03-18T14:35:20Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)
#### Post date: [March 18, 2021, 10:14pm UTC](https://www.finalbuilder.com/forums/t/problem-with-git-submodules/6988/5 "2021-03-18T22:14:39Z")

</div>

> [@uraabe](#):
>
> 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).

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](https://www.finalbuilder.com/forums/uploads/default/original/2X/5/51b94c64bb2c459f333296d1205d36ac0bbd40ef.png)

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.

---

<div class="post-metadata">

### Author: ![uraabe](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/uraabe/32/2502_2.png) [@uraabe](https://www.finalbuilder.com/forums/u/uraabe)
#### Post date: [March 19, 2021, 10:54am UTC](https://www.finalbuilder.com/forums/t/problem-with-git-submodules/6988/6 "2021-03-19T10:54:26Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [March 19, 2021, 12:01pm UTC](https://www.finalbuilder.com/forums/t/problem-with-git-submodules/6988/7 "2021-03-19T12:01:17Z")

</div>

You can pm Dave or email to support @ [finalbuilder.com](http://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.

---

<div class="post-metadata">

### Author: ![uraabe](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/uraabe/32/2502_2.png) [@uraabe](https://www.finalbuilder.com/forums/u/uraabe)
#### Post date: [March 19, 2021, 12:22pm UTC](https://www.finalbuilder.com/forums/t/problem-with-git-submodules/6988/8 "2021-03-19T12:22:52Z")

</div>

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