Skip to main content

Push scripts from a Git repo to a JSS. Includes templating and tagging.

Project description


Version : v2.0.1

Author: Geoff Lee


Question: How do you ensure that all changes to Scripts and ComputerExtensionAttributes in your JAMF JSS are logged, reversible, and match what you have in source control?

Answer: Make it zero-effort.

Using Git2jss, after making changes to JSS Scripts or CEAs in your dev/test environment and pushing them to a Git repository, you can export a tagged copy to your JSS, complete with the Git changelog in the ‘Notes’ field. Reverting a change is as easy as exporting the previous tagged version.

You can also use this script in a Continuous Integration pipeline to export scripts from the head of a given branch to your JSS.

Templating of some important values is also supported, so your scripts automatically contain details of the last change, and where they can be found in source control.

Passwords are stored in the system keychain by default.

Installation / Usage

NB: the python-jss and keyring modules are required. If manually installing, you’ll need to make sure they are present. Installing via pip should take care of this for you.

Install via pip

If you’re installing into a virtualenv

$ pip install git2jss

should be all you need to do.

If installing onto OS X 10.13 and not using a virtualenv, you’ll need to use sudo, and install a missing dependency:

$ sudo pip install git2jss

$ sudo pip install cryptography

Or manually

Clone the repo and run the setup script

$ git clone

$ python install



You can use it on the commandine like this:

# Export the file to a Script object on the JSS called
# using the existing tag v0.0.9

$ git tag v0.0.9 && git push origin v0.0.9
$ git2jss --file --name --tag v0.0.9

# Export the file at the head of the master branch
# to an object on the JSS with the same name

$ git2jss --file --branch master

# Export the file to a ComputerExtensionAttribute object on the JSS called
# FirewallCheck, using the existing tag v0.0.9

$ git2jss --mode ComputerExtensionAttribute --file --name check-firewall --tag v0.0.9

# Export each script in the current folder that has a script object on the server
# with a matching name, and exists at tag v1.0.2

$ git2jss --all --tag v1.0.2

# Or do the same for all files at the head of branch 'production'

$ git2jss --all --branch production

# Show information about the currently configured JSS (or enter details if none configured)

$ git2jss --jss-info


The following variables, if embedded into your script, will be replaced with the indicated values when being transferred to the JSS




If –tag was used: The name of the git tag that you have specified (eg v1.0.1) If –branch was used: The commit hash of the last change of the file, and a note of the branch


Assuming you have a git remote called ‘origin’, the URL thereof (eg


The name of the file in the git repository identified by @@ORIGIN``


The date of the last change of the file in Git


The username used by git2jss to authenticate to the JSS at the time the script was exported


The entire Git log for this script, formatted thus: '%h - %cD %ce: %n %s%n'

@@LOG is used to construct the ‘Notes’ field in the JSS, overwriting anything that was present previously.


Issues and pull requests are very welcome!

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

git2jss-2.0.1.tar.gz (15.3 kB view hashes)

Uploaded source

Built Distribution

git2jss-2.0.1-py2.py3-none-any.whl (27.9 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page