Git Fileserver Backend
With this backend, branches and tags in a remote git repository are exposed to salt as different environments.
To enable, add
gitfs to the
fileserver_backend option in the
Master config file.
fileserver_backend: - gitfs
git also works here. Prior to the 2018.3.0 release, only
The Git fileserver backend supports both pygit2 and GitPython, to provide the Python interface to git. If both are present, the order of preference for which one will be chosen is the same as the order in which they were listed: pygit2, then GitPython.
More detailed information on how to use GitFS can be found in the GitFS Walkthrough.
To use pygit2 for GitFS requires a minimum pygit2 version of 0.20.3. pygit2 0.20.3 requires libgit2 0.20.0. pygit2 and libgit2 are developed alongside one another, so it is recommended to keep them both at the same major release to avoid unexpected behavior. For example, pygit2 0.21.x requires libgit2 0.21.x, pygit2 0.22.x will require libgit2 0.22.x, etc.
To clear stale refs the git CLI utility must also be installed.