【发布时间】:2021-01-07 13:08:09
【问题描述】:
我正在使用 Python Social Auth 包来使用 Google OAuth 服务。它在我的本地机器上运行良好。但是,当我在 VM linux 机器上部署应用程序时,出现以下错误:
AuthFailed at /complete/google-oauth2/
Authentication failed: HTTPSConnectionPool(host='accounts.google.com', port=443): Max retries exceeded with url: /o/oauth2/token (Caused by <class 'socket.gaierror'>: [Errno -2] Name or service not known)
Exception Type: AuthFailed
Exception Value: Authentication failed: HTTPSConnectionPool(host='accounts.google.com', port=443): Max retries exceeded with url: /o/oauth2/token (Caused by <class 'socket.gaierror'>: [Errno -2] Name or service not known)
有人可以帮帮我吗?提前致谢。
【问题讨论】:
-
您的虚拟机似乎无法访问端口 443 (
https),您可以在该虚拟机中执行wget https://accounts.google.com吗?
标签: python django python-social-auth