Hello Alex,
if you are admin of the dispatcher, then you can use git-credentials-store (see
https://git-scm.com/docs/git-credential-store) as root. In fact, lava-run (the process actually booting the board, deploying the overlay, ...) is ran as root. So if root does have access to your git credentials then lava-run would also have access.
Keep in mind that if you use git-credentials-store on the dispatcher, any jobs running on this dispatcher will have access to your credentials!
So this solution is only acceptable for private dispatchers.
Rgds