Github Webhook更新树莓烧瓶Web服务器上的网站

时间:2020-08-03 08:38:54

标签: python ubuntu github flask access-rights

我在树莓派上托管一个网站。

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

我正在使用apache2和flask来托管该站点。

在Github上,我启用了带有POST请求的Webhook,以便能够自动更新我的代码。调用webhook时,我在我的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.

0 个答案:

没有答案
相关问题