Repository: inventree/InvenTree

Issue:
Multiple lines of "fatal: not a git repository (or any of the parent directories): .git" during update
### Please verify that this bug has NOT been raised before.

- [X] I checked and didn't find a similar issue

### Describe the bug*

Probably not a bug per se, since everything is working alright - but maybe something to take a look into:

During `docker-compose run inventree-server invoke update` I always get multiple lines of the error message
`fatal: not a git repository (or any of the parent directories): .git`

Can I debug this further to understand where to look for fixing this?

### Steps to Reproduce

Run  `docker-compose run inventree-server invoke update` in a docker production installation.

### Expected behaviour

No fatal errors unless something is actually wrong ;-)

### Deployment Method

- [X] Docker
- [ ] Bare metal

### Version Information

# Version Information:
InvenTree-Version: 0.11.0 dev
Django Version: 3.2.18
Commit Hash: e9a1b57
Commit Date: 2023-02-28
Database: postgresql
Debug-Mode: False
Deployed using Docker: True
Active plugins: [{'name': 'InvenTreeBarcode', 'slug': 'inventreebarcode', 'version': '2.0.0'}, {'name': 'InvenTreeCoreNotificationsPlugin', 'slug': 'inventreecorenotificationsplugin', 'version': '1.0.0'}, {'name': 'IPNAutoGenerator', 'slug': 'ipnautogenerator', 'version': None}, {'name': 'Brother Labels', 'slug': 'brother', 'version': '0.6.0'}]


### Relevant log output

```shell
docker-compose run inventree-server invoke update
Creating network "inventree-production_default" with the default driver
Creating inventree-db ... done
Creating inventree-production_inventree-server_run ... done
Loading config file : /home/inventree/data/config.yaml
Installing required python packages from 'requirements.txt'
Requirement already satisfied: pip in /usr/local/lib/python3.9/site-packages (23.0.1)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Requirement already satisfied: arrow==1.2.3 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 7)) (1.2.3)
Requirement already satisfied: asgiref==3.6.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 9)) (3.6.0)
Requirement already satisfied: babel==2.11.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 11)) (2.11.0)
Requirement already satisfied: bleach[css]==6.0.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 13)) (6.0.0)
Requirement already satisfied: blessed==1.20.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 15)) (1.20.0)
Requirement already satisfied: brotli==1.0.9 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 17)) (1.0.9)
Requirement already satisfied: certifi==2022.12.7 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 19)) (2022.12.7)
Requirement already satisfied: cffi==1.15.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 23)) (1.15.1)
Requirement already satisfied: charset-normalizer==3.0.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 27)) (3.0.1)
Requirement already satisfied: coreapi==2.3.3 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 29)) (2.3.3)
Requirement already satisfied: coreschema==0.0.4 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 31)) (0.0.4)
Requirement already satisfied: cryptography==3.4.8 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 33)) (3.4.8)
Requirement already satisfied: cssselect2==0.7.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 37)) (0.7.0)
Requirement already satisfied: defusedxml==0.7.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 39)) (0.7.1)
Requirement already satisfied: diff-match-patch==20200713 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 43)) (20200713)
Requirement already satisfied: django==3.2.18 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 45)) (3.2.18)
Requirement already satisfied: django-allauth==0.52.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 73)) (0.52.0)
Requirement already satisfied: django-allauth-2fa==0.10.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 77)) (0.10.0)
Requirement already satisfied: django-cleanup==7.0.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 79)) (7.0.0)
Requirement already satisfied: django-cors-headers==3.13.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 81)) (3.13.0)
Requirement already satisfied: django-crispy-forms==1.14.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 83)) (1.14.0)
Requirement already satisfied: django-dbbackup==4.0.2 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 85)) (4.0.2)
Requirement already satisfied: django-error-report==0.2.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 87)) (0.2.0)
Requirement already satisfied: django-filter==22.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 89)) (22.1)
Requirement already satisfied: django-formtools==2.4 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 91)) (2.4)
Requirement already satisfied: django-ical==1.8.3 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 93)) (1.8.3)
Requirement already satisfied: django-import-export==2.5.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 95)) (2.5.0)
Requirement already satisfied: django-js-asset==2.0.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 97)) (2.0.0)
Requirement already satisfied: django-maintenance-mode==0.18.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 99)) (0.18.0)
Requirement already satisfied: django-markdownify==0.9.2 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 101)) (0.9.2)
Requirement already satisfied: django-money==2.1.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 103)) (2.1.1)
Requirement already satisfied: django-mptt==0.11.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 105)) (0.11.0)
Requirement already satisfied: django-otp==1.1.4 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 107)) (1.1.4)
Requirement already satisfied: django-picklefield==3.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 109)) (3.1)
Requirement already satisfied: django-q==1.3.9 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 111)) (1.3.9)
Requirement already satisfied: django-q-sentry==0.1.6 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 113)) (0.1.6)
Requirement already satisfied: django-recurrence==1.11.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 115)) (1.11.1)
Requirement already satisfied: django-redis==5.2.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 117)) (5.2.0)
Requirement already satisfied: django-sql-utils==0.6.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 119)) (0.6.1)
Requirement already satisfied: django-sslserver==0.22 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 121)) (0.22)
Requirement already satisfied: django-stdimage==5.3.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 123)) (5.3.0)
Requirement already satisfied: django-user-sessions==2.0.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 125)) (2.0.0)
Requirement already satisfied: django-weasyprint==2.2.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 127)) (2.2.0)
Requirement already satisfied: django-xforwardedfor-middleware==2.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 129)) (2.0)
Requirement already satisfied: djangorestframework==3.14.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 131)) (3.14.0)
Requirement already satisfied: et-xmlfile==1.1.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 133)) (1.1.0)
Requirement already satisfied: feedparser==6.0.10 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 135)) (6.0.10)
Requirement already satisfied: fonttools[woff]==4.38.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 137)) (4.38.0)
Requirement already satisfied: gunicorn==20.1.0 in /usr/local/lib/python3.9/site-packages (from -r requirements.txt (line 139)) (20.1.0)
Requirement already satisfied: html5lib==1.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 141)) (1.1)
Requirement already satisfied: icalendar==5.0.4 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 143)) (5.0.4)
Requirement already satisfied: idna==3.4 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 145)) (3.4)
Requirement already satisfied: importlib-metadata==6.0.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 147)) (6.0.0)
Requirement already satisfied: itypes==1.2.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 149)) (1.2.0)
Requirement already satisfied: jinja2==3.1.2 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 151)) (3.1.2)
Requirement already satisfied: markdown==3.4.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 153)) (3.4.1)
Requirement already satisfied: markuppy==1.14 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 155)) (1.14)
Requirement already satisfied: markupsafe==2.1.2 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 157)) (2.1.2)
Requirement already satisfied: oauthlib==3.2.2 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 159)) (3.2.2)
Requirement already satisfied: odfpy==1.4.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 161)) (1.4.1)
Requirement already satisfied: openpyxl==3.1.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 163)) (3.1.1)
Requirement already satisfied: pdf2image==1.16.2 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 165)) (1.16.2)
Requirement already satisfied: pillow==9.4.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 167)) (9.4.0)
Requirement already satisfied: py-moneyed==1.2 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 175)) (1.2)
Requirement already satisfied: pycparser==2.21 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 179)) (2.21)
Requirement already satisfied: pydyf==0.5.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 181)) (0.5.0)
Requirement already satisfied: pyjwt[crypto]==2.6.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 183)) (2.6.0)
Requirement already satisfied: pyphen==0.13.2 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 185)) (0.13.2)
Requirement already satisfied: pypng==0.20220715.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 187)) (0.20220715.0)
Requirement already satisfied: python-barcode[images]==0.14.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 189)) (0.14.0)
Requirement already satisfied: python-dateutil==2.8.2 in /usr/local/lib/python3.9/site-packages (from -r requirements.txt (line 191)) (2.8.2)
Requirement already satisfied: python-fsutil==0.10.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 196)) (0.10.0)
Requirement already satisfied: python3-openid==3.2.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 198)) (3.2.0)
Requirement already satisfied: pytz==2022.7.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 200)) (2022.7.1)
Requirement already satisfied: pyyaml==6.0 in /usr/local/lib/python3.9/site-packages (from -r requirements.txt (line 207)) (6.0)
Requirement already satisfied: qrcode[pil]==7.4.2 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 209)) (7.4.2)
Requirement already satisfied: rapidfuzz==0.7.6 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 213)) (0.7.6)
Requirement already satisfied: redis==3.5.3 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 215)) (3.5.3)
Requirement already satisfied: regex==2022.10.31 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 219)) (2022.10.31)
Requirement already satisfied: requests==2.28.2 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 221)) (2.28.2)
Requirement already satisfied: requests-oauthlib==1.3.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 226)) (1.3.1)
Requirement already satisfied: sentry-sdk==1.15.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 228)) (1.15.0)
Requirement already satisfied: sgmllib3k==1.0.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 232)) (1.0.0)
Requirement already satisfied: six==1.16.0 in /usr/local/lib/python3.9/site-packages (from -r requirements.txt (line 234)) (1.16.0)
Requirement already satisfied: sqlparse==0.4.3 in /usr/local/lib/python3.9/site-packages (from -r requirements.txt (line 240)) (0.4.3)
Requirement already satisfied: tablib[html,ods,xls,xlsx,yaml]==3.3.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 244)) (3.3.0)
Requirement already satisfied: tinycss2==1.1.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 248)) (1.1.1)
Requirement already satisfied: typing-extensions==4.5.0 in /usr/local/lib/python3.9/site-packages (from -r requirements.txt (line 253)) (4.5.0)
Requirement already satisfied: uritemplate==4.1.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 255)) (4.1.1)
Requirement already satisfied: urllib3==1.26.14 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 257)) (1.26.14)
Requirement already satisfied: wcwidth==0.2.6 in /usr/local/lib/python3.9/site-packages (from -r requirements.txt (line 261)) (0.2.6)
Requirement already satisfied: weasyprint==54.3 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 263)) (54.3)
Requirement already satisfied: webencodings==0.5.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 267)) (0.5.1)
Requirement already satisfied: xlrd==2.0.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 273)) (2.0.1)
Requirement already satisfied: xlwt==1.3.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 275)) (1.3.0)
Requirement already satisfied: zipp==3.14.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 277)) (3.14.0)
Requirement already satisfied: zopfli==0.2.2 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 279)) (0.2.2)
Requirement already satisfied: setuptools in /usr/local/lib/python3.9/site-packages (from django-money==2.1.1->-r requirements.txt (line 103)) (65.6.3)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Backing up InvenTree database...
Backing Up Database: inventree
Writing file to default-99763481f842-2023-02-28-144433.psql.bin.gz
Backing up InvenTree media files...
Writing file to 99763481f842-2023-02-28-144452.tar.gz
Running InvenTree database migrations...
========================================
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
No changes detected
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
Operations to perform:
  Apply all migrations: InvenTree, account, admin, auth, authtoken, build, common, company, contenttypes, django_q, error_report, exchange, label, order, otp_static, otp_totp, part, plugin, report, sites, socialaccount, stock, user_sessions, users
Running migrations:
  Applying InvenTree.0001_initial... OK
  Applying InvenTree.0002_auto_20230228_0131... OK
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
Operations to perform:
  Synchronize unmigrated apps: allauth, allauth_2fa, corsheaders, crispy_forms, dbbackup, django_cleanup, django_filters, django_ical, django_otp, djmoney, formtools, import_export, maintenance_mode, markdownify, messages, mptt, rest_framework, staticfiles
  Apply all migrations: InvenTree, account, admin, auth, authtoken, build, common, company, contenttypes, django_q, error_report, exchange, label, order, otp_static, otp_totp, part, plugin, report, sites, socialaccount, stock, user_sessions, users
Synchronizing apps without migrations:
  Creating tables...
    Running deferred SQL...
Running migrations:
  No migrations to apply.
System check identified no issues (1 silenced).
========================================
InvenTree database migrations completed!
render filters.js
render model_renderers.js
render forms.js
render order.js
render bom.js
render search.js
render notification.js
render report.js
render part.js
render pricing.js
render news.js
render plugin.js
render api.js
render tables.js
render charts.js
render barcode.js
render build.js
render helpers.js
render label.js
render attachment.js
render table_filters.js
render stock.js
render company.js
render modals.js
rendered all files in /home/inventree/InvenTree/templates/js/translated
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git

2899 static files copied to '/home/inventree/data/static'.
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
14:51:03 [Q] INFO Enqueued 38432
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
File “/home/inventree/InvenTree/locale/fa/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/ja/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/zh/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/de/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/tr/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/cs/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/pt/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/ko/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/da/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/vi/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/ru/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/es_MX/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/it/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/el/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/pl/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/nl/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/pt_br/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/es/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/id/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/th/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/hu/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/sl/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/en/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/no/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/fr/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/sv/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/he/LC_MESSAGES/django.po” is already compiled and up to date.
InvenTree translation coverage: 22%
```



Discussion:
I have seen them too, I am not really sure where they come from. @simonkuehling do you use git-based plugins? Plugin discovery/install is the only place I can think of where we use git.
I have the `inventree-brother-plugin` running - does that pull from git? Or is that packaged somewhere else? I’m not too familiar with the inner workings of `pip`
>I have the `inventree-brother-plugin` running - does that pull from git? Or is that packaged somewhere else? I’m not too familiar with the inner workings of `pip`

I'm seeing the same thing... I just installed the plugin (which **_is_** pulled from git) mentioned and it's failing to start the server on a restart, it continuously cycles through the following:

```
inventree-server  | [2023-03-22 18:15:46 +0000] [42] [CRITICAL] WORKER TIMEOUT (pid:2675)
inventree-server  | [2023-03-22 18:15:46 +0000] [42] [CRITICAL] WORKER TIMEOUT (pid:2676)
inventree-server  | [2023-03-22 18:15:46 +0000] [42] [CRITICAL] WORKER TIMEOUT (pid:2677)
inventree-server  | [2023-03-22 18:15:46 +0000] [42] [CRITICAL] WORKER TIMEOUT (pid:2678)
inventree-server  | [2023-03-22 18:15:46 +0000] [42] [WARNING] Worker with pid 2678 was terminated due to signal 9
inventree-server  | [2023-03-22 18:15:46 +0000] [42] [WARNING] Worker with pid 2675 was terminated due to signal 9
inventree-server  | [2023-03-22 18:15:46 +0000] [42] [WARNING] Worker with pid 2676 was terminated due to signal 9
inventree-server  |   Running command git clone --filter=blob:none --quiet https://github.com/wolflu05/inventree-bulk-plugin /tmp/pip-req-build-uepmjwio
inventree-server  |   Running command git clone --filter=blob:none --quiet https://github.com/wolflu05/inventree-bulk-plugin /tmp/pip-req-build-yzepjg5c
inventree-server  |   Running command git clone --filter=blob:none --quiet https://github.com/wolflu05/inventree-bulk-plugin /tmp/pip-req-build-drermrmt
inventree-server  |   Running command git clone --filter=blob:none --quiet https://github.com/wolflu05/inventree-bulk-plugin /tmp/pip-req-build-n7wlnn0f
```

Removing it from the plugins.txt file, and server starts normally - although there are additional git errors shown.
@ericmoon did you manage to get the plugin installed eventually?
I'm getting this error just following the instructions in  https://docs.inventree.org/en/stable/start/docker_prod/ with no extra plugins. I'm unable to install it. The installation works, the server starts, but I'm unable to login with superuser, I tried with variables in .env and with invoke superuser, none of the users I create work
@SchrodingersGat - I haven't gone back and and tried recently.  I should have some time this weekend to give it another go.


> I'm getting this error just following the instructions in https://docs.inventree.org/en/stable/start/docker_prod/ with no extra plugins. I'm unable to install it. The installation works, the server starts, but I'm unable to login with superuser, I tried with variables in .env and with invoke superuser, none of the users I create work

@IvoLealMCS this sounds like a different issue - the "not a git repository" message is annoying but should not stop an install. Please open a new issue for this :)
I am removing the milestone for this as it is not an urgent bug but still am interested in working it out and removing the warning messages
While we can improve the git detection I am questioning if we want to continue to support git metadata detection or if we should factor it out. That would make the core plugin code simpler and reduce the size of the docker image as we could remove git from that too.

Regarding install and update speed as well as size pip-based plugins are far supior. I see it especially with automated installs that pip-based instances are just easier.

Thoughts @inventree/triage ? We could add a warning with the major release and remove the feature in the next one. Maybe we could also send out news linking to this issue?
So removing git metadata detection (and git) would mean that plugins cannot be installed directly from a git repo? This might be problematic for users who have plugins installed from sources such as an internal gitlab server...
My suggestion is to remove metadata detection and adapt the docker image. You could still install git when deploying with docker and detecting plugins would not be impacted. It would not show the author, last change and git signatures. And would be a bit faster as we would stop calling git binaries.
That seems like a reasonable compromise then, losing that git metadata is not too much of a loss IMO
Turns out we also relai on git here:
https://github.com/inventree/InvenTree/blob/5cd74c4190d3c5261447572546f317c35f4cbac1/InvenTree/InvenTree/version.py#L96-L107

Which will throw an error if you downloaded the source etc. I think we need/want this info so maybe we can not remove git dependencies.
@matmair good point. I wonder if there is another way to suppress this warning

Resolving patch:
diff --git a/InvenTree/InvenTree/version.py b/InvenTree/InvenTree/version.py
--- a/InvenTree/InvenTree/version.py
+++ b/InvenTree/InvenTree/version.py
@@ -93,6 +93,30 @@ def inventreeDjangoVersion():
     return django.get_version()
 
 
+git_available: bool = None  # is git available and used by the install?
+
+
+def check_for_git():
+    """Check if git is available on the install."""
+    global git_available
+
+    if git_available is not None:
+        return git_available
+
+    try:
+        subprocess.check_output('git --version'.split(), stderr=subprocess.DEVNULL)
+    except Exception:
+        git_available = False
+
+    if git_available is None:
+        try:
+            subprocess.check_output('git status'.split(), stderr=subprocess.DEVNULL)
+            git_available = True
+            return True
+        except Exception:
+            git_available = False
+
+
 def inventreeCommitHash():
     """Returns the git commit hash for the running codebase."""
     # First look in the environment variables, i.e. if running in docker
@@ -101,6 +125,9 @@ def inventreeCommitHash():
     if commit_hash:
         return commit_hash
 
+    if not check_for_git():
+        return None
+
     try:
         return str(subprocess.check_output('git rev-parse --short HEAD'.split()), 'utf-8').strip()
     except Exception:  # pragma: no cover
@@ -115,6 +142,9 @@ def inventreeCommitDate():
     if commit_date:
         return commit_date.split(' ')[0]
 
+    if not check_for_git():
+        return None
+
     try:
         d = str(subprocess.check_output('git show -s --format=%ci'.split()), 'utf-8').strip()
         return d.split(' ')[0]


Test patch: