Веб-перехватчик Github для обновления веб-сайта на веб-сервере raspberry flask - PullRequest
0 голосов
/ 03 августа 2020

Я размещаю веб-сайт на Raspberry Pi.

ОС: Ubuntu 20.04 LTS (GNU / Linux 5.4.0-1011-raspi armv7l)

Я использую apache2 и flask для размещения сайта.

На Github я включил веб-перехватчик с запросом POST, чтобы иметь возможность автоматически обновлять свой код. Когда вызывается веб-перехватчик, я добавил в свое приложение flask:

os.chdir("/var/www/webApp/webApp/")
os.system("git pull cp master")

Но это не работает, я получаю следующий вывод в файле:

/var/log/apache2/error.log'

[Mon Aug 03 08:10:00.483894 2020] [mpm_event:notice] [pid 15556:tid 3069884992] AH00491: caught SIGTERM, shutting down
[Mon Aug 03 08:10:00.662437 2020] [mpm_event:notice] [pid 9472:tid 3069925952] AH00489: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f mod_wsgi/4.6.8 Python/3.8 configured -- resuming normal operations
[Mon Aug 03 08:10:00.662848 2020] [core:notice] [pid 9472:tid 3069925952] AH00094: Command line: '/usr/sbin/apache2'
[Mon Aug 03 08:11:32.481342 2020] [wsgi:error] [pid 9474:tid 3044013088] /usr/local/lib/python3.8/dist-packages/flask_sqlalchemy/__init__.py:833: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future.  Set it to True or False to suppress this warning.
[Mon Aug 03 08:11:32.481439 2020] [wsgi:error] [pid 9474:tid 3044013088]   warnings.warn(FSADeprecationWarning(
[Mon Aug 03 08:12:22.016676 2020] [wsgi:error] [pid 9473:tid 2948584480] /usr/local/lib/python3.8/dist-packages/flask_sqlalchemy/__init__.py:833: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future.  Set it to True or False to suppress this warning.
[Mon Aug 03 08:12:22.016772 2020] [wsgi:error] [pid 9473:tid 2948584480]   warnings.warn(FSADeprecationWarning(
[Mon Aug 03 08:24:42.661910 2020] [wsgi:error] [pid 9474:tid 2890880032] [client 140.82.115.146:26975] WARNING:webApp:<Request 'https://xxxxxxxxxxxxxxxxxxxxxxxxxxx' [POST]>
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...