Error with git2jss

ChrisGray
New Contributor

I'm attempting to use the git2jss python package from PIP to sync a git repository with my scripts on the JSS server. I get the following:

pip install git2jss
git2jss --jss-info

Traceback (most recent call last):
  File "/usr/local/bin/git2jss", line 7, in <module>
    from git2jss.__init__ import main
ModuleNotFoundError: No module named 'git2jss.__init__'

Has anyone else gotten this working? I found it here:
Jamf Marketplace git2jss

3 REPLIES 3

tlarkin
Honored Contributor

If you are using system python (shipped with macOS) the framework is located in /Library so you may need to sudo that pip install command to ensure it is installed. You can also use pip to check if it is installed. With out knowing how py2jss works this is just my guess

ChrisGray
New Contributor

I'm actually running this on Linux. We have our JSS installed on a Linux server, and I was attempting to host the repositories on that server. Does git2jss require a mac to work? I thought being Python it should run on Linux without issue.

tlarkin
Honored Contributor

Well this depends on many factors, how you installed Python, how you set up the env, where you installed the module, etc. ENV path matters too, you can try to import the module from full path with something like os or you can work with in the directory that the module exists, or add the module to existing Python library paths. Python is fantastic, but it can be a pain to manage I will admit that