Git: Unsafe repository is owned by someone else (Windows)

After updating git the following message appeared during opening the repository with SourceTree:

I tried out two different possibilities to solve this problem. First, I added the recommended command from the error message

git config --global --add <repo-path>

This solution works fine but has the big impact that changing the repository path afterwards would lead to the same error again. So I removed the entry from


and I found out that a better soluation would be to adapt the security settings for the repository in Windows by performing the following steps:

  • Open Windows “Explorer” and go to the repository where the error occurred
  • Right click on the repository directory and select “Properties”
  • Open the “Security” tab and click on “Extended”
  • Change the “Owner” in the top of the window to your user account

For me this worked perfectly and I didn’t need to set the repository on the safe list of the global git configuration.

Grafana Loki

  • Github
    > git clone
  • Docker
    > cd loki/production
    > docker-compose pull
    > docker-compose up
  • Grafana
    Used for visualization of log file data.
    • Open Browser
    • Credentials
      Username: admin
      Password: admin
    • Activate Loki
  • promtail
    Pushes log file content to Grafana Loki.
    1. Open
    2. Download e.g.
    3. Unzip
    4. Configuration
      1. Create config.yaml, for content see appendix
      2. Hints
        1. Keep attention to parse your timestamp correctly, otherwise you will see only the date/time of the import timestamp. Timestamps are handled by go, so use online editors to check your parsings,
        2. Keep attention on multilines.
        3. Regular expressions can be quiet comprehensive to read, so use online regex parser/checker, e.g.
  • Start promtail
    promtail.exe -config.file=config.yaml
  • Back to Grafana



  http_listen_port: 9080
  grpc_listen_port: 0

  filename: D:/promtail/positions.yaml # will be created automatically by promtail. This location needs to be writeable by promtail.

  url: http://localhost:3100/loki/api/v1/push
    username: admin
    password: admin

  - job_name: MyApp
    - multiline: # identify timestamps as first line of a multiline block.
        firstline: '^\d{4}-\d{2}-\d{2}.\d{1,2}:\d{2}:\d{2}.\d{4}'
        max_wait_time: 3s
    - regex: # #
        expression: '^(?P<date>\d{1,4}.\d{1,2}.\d{1,2}).(?P<time>\d{1,4}.\d{1,2}.\d{1,2}).(?P<ms>\d{1,3})..(?P<level>[\w\s]+)'
    - template:
        source: time
        template: '{{ .date }}T{{ .time }}.{{ .ms }}+02:00'
    - timestamp:
        source: time
        format: "2006-01-02T15:04:05.000-07:00" # #time.Parse
    - labels:
      - targets:
          - localhost
          job: MyApp # A `job` label is fairly standard in prometheus and useful for linking metrics and logs.
          host: workstation # A `host` label will help identify logs from this machine vs others
          agent: promtail
          __path__: D:/logs/*.log