linuxserver/docker-sickchill

fix for sickchill git errors

nopoz opened this issue · 3 comments

nopoz commented

This is a fix for the issue described in #18 and #19

Fresh container of sickchill produces the following errors:

2020-05-13 14:50:42 DEBUG    CHECKVERSION :: Executing git symbolic-ref -q HEAD with your shell in /app/sickchill
2020-05-13 14:50:42 ERROR    CHECKVERSION :: [ebcb4d6] git symbolic-ref -q HEAD returned :
None
2020-05-13 14:50:42 DEBUG    CHECKVERSION :: Executing git rev-parse HEAD with your shell in /app/sickchill
2020-05-13 14:50:42 DEBUG    CHECKVERSION :: git rev-parse HEAD : returned successful
2020-05-13 14:50:42 DEBUG    CHECKVERSION :: Executing git config remote.origin.url https://github.com/SickChill/SickChill.git with your shell in
/app/sickchill
2020-05-13 14:50:42 ERROR    CHECKVERSION :: [7df68f1] git config remote.origin.url https://github.com/SickChill/SickChill.git returned code 255,
treating as error : error: could not lock config file .git/config: Permission denied
None
2020-05-13 14:50:42 DEBUG    CHECKVERSION :: Executing git fetch origin --prune with your shell in /app/sickchill
2020-05-13 14:50:42 ERROR    CHECKVERSION :: [7df68f1] git fetch origin --prune returned code 255, treating as error : error: cannot open .git/FET
CH_HEAD: Permission denied
2020-05-13 14:50:42 WARNING  CHECKVERSION :: Unable to contact github, can't check for update
2020-05-13 14:52:02 ERROR    WEBSERVER-CONFIG :: [7df68f1] git symbolic-ref -q HEAD returned :
None
2020-05-13 14:52:03 WARNING  WEBSERVER-CONFIG :: git rev-parse --verify --quiet "@{upstream}" returned : (128) fatal: HEAD does not point to a branch

Previous feedback has been to ignore these errors. However, the problems with these log lines are:

  1. These errors and warnings are logged in the WebUI and add unnecessary noise. They need to be manually cleared. They will reoccur every time the container is started.
  2. The user is not able to be notified of new versions that are released without manually comparing the git commit version in the UI with the source github project.

The fix is to give the sickchill docker user ownership of the /app/sickchill/.git* files and re-linking to the master branch:

Log into the docker container:

docker exec -t -i sickchill /bin/bash

Make the necessary changes to file ownership and git:

chown -R abc:abc /app/sickchill/.git*
git remote set-head origin -a
git checkout master

After the changes are made and the container is restarted, no errors are produced and a version check is successful:

2020-05-13 14:55:06 DEBUG    CHECKVERSION :: Starting new thread: CHECKVERSION
2020-05-13 14:55:06 INFO     CHECKVERSION :: Checking for updates using GIT
2020-05-13 14:55:06 DEBUG    CHECKVERSION :: Executing git symbolic-ref -q HEAD with your shell in /app/sickchill
2020-05-13 14:55:06 DEBUG    CHECKVERSION :: git symbolic-ref -q HEAD : returned successful
2020-05-13 14:55:06 DEBUG    CHECKVERSION :: Executing git rev-parse HEAD with your shell in /app/sickchill
2020-05-13 14:55:06 DEBUG    CHECKVERSION :: git rev-parse HEAD : returned successful
2020-05-13 14:55:06 DEBUG    CHECKVERSION :: Executing git config remote.origin.url https://github.com/SickChill/SickChill.git with your shell in
/app/sickchill
2020-05-13 14:55:06 DEBUG    CHECKVERSION :: git config remote.origin.url https://github.com/SickChill/SickChill.git : returned successful
2020-05-13 14:55:06 DEBUG    CHECKVERSION :: Executing git fetch origin --prune with your shell in /app/sickchill
2020-05-13 14:55:06 DEBUG    CHECKVERSION :: git fetch origin --prune : returned successful
2020-05-13 14:55:06 DEBUG    CHECKVERSION :: Executing git branch --set-upstream-to origin/master with your shell in /app/sickchill
2020-05-13 14:55:07 DEBUG    CHECKVERSION :: git branch --set-upstream-to origin/master : returned successful
2020-05-13 14:55:07 DEBUG    CHECKVERSION :: Executing git rev-parse --verify --quiet "@{upstream}" with your shell in /app/sickchill
2020-05-13 14:55:07 DEBUG    CHECKVERSION :: git rev-parse --verify --quiet "@{upstream}" : returned successful
2020-05-13 14:55:07 DEBUG    CHECKVERSION :: Executing git rev-list --left-right "@{upstream}"...HEAD with your shell in /app/sickchill
2020-05-13 14:55:07 DEBUG    CHECKVERSION :: git rev-list --left-right "@{upstream}"...HEAD : returned successful
2020-05-13 14:55:07 DEBUG    CHECKVERSION :: cur_commit = 7df68f18c147ec8d72244b404b59dd8eeac976a1, newest_commit = 7df68f18c147ec8d72244b404b59dd
8eeac976a1, num_commits_behind = 0, num_commits_ahead = 0

It would be great if these changes can be incorporated into the default container. Thanks!

git checkout master is not an acceptable solution as these are versioned images of the published tags

You can disable the updater and the errors will go away.

We do not recommend or support using the built-in updater. We provide the supported update methods and instructions in the readme

nopoz commented

@aptalca disabling the updater does not get rid of all these git errors

Feel free to report upstream that checking out a tag or a commit results in errors in the log. They do list those activities as acceptable methods in their docs: https://github.com/SickChill/SickChill/wiki/FAQ's-and-Fixes#how-to-switch-to-an-older-sickchill-version