hacs / integration

HACS gives you a powerful UI to handle downloads of all your custom needs.
https://hacs.xyz
MIT License
5.32k stars 1.28k forks source link

Could not authenticate with GitHub #3252

Closed Segullah closed 1 year ago

Segullah commented 1 year ago

System Health details

System Information

version core-2023.9.1
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.11.5
os_name Linux
os_version 6.1.45
arch x86_64
timezone America/New_York
config_dir /config
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | pending can_reach_cloud_auth | pending can_reach_cloud | pending
Home Assistant Supervisor host_os | Home Assistant OS 10.5 -- | -- update_channel | stable supervisor_version | supervisor-2023.08.3 agent_version | 1.5.1 docker_version | 23.0.6 disk_total | 28.0 GB disk_used | 6.9 GB healthy | true supported | true board | generic-x86-64 supervisor_api | ok version_api | pending installed_addons | Advanced SSH & Web Terminal (15.0.7), Studio Code Server (5.10.1), Z-Wave JS (0.1.89), Z-Wave JS UI (1.15.9), Home Assistant Google Drive Backup (0.111.1), Silicon Labs Flasher (0.2.0)
Dashboards dashboards | 1 -- | -- resources | 0 mode | auto-gen
Recorder oldest_recorder_run | September 5, 2023 at 12:36 AM -- | -- current_recorder_run | September 9, 2023 at 6:13 PM estimated_db_size | 4.59 MiB database_engine | sqlite database_version | 3.41.2

Checklist

Describe the issue

When trying to install the HACS integration, the process fails at the point that it tries to authenticate with GitHub, because it cannot connect to host github.com:443.

Reproduction steps

  1. Installed HACS by wget as in instruction
  2. Settings => Devices & Services => Add Integration => Search for HACS
  3. Select HACS. A new popup appears.
  4. Check all boxes and click Submit image
  5. Error message popup stating HACS Could not authenticate with GitHub image
  6. Using the terminal commands ping, nc and nmap, I've confirmed that github and the port are accessible. image

Debug logs

This error originated from a custom integration.

Logger: custom_components.hacs
Source: custom_components/hacs/config_flow.py:49
Integration: HACS (documentation, issues)
First occurred: 6:17:49 PM (3 occurrences)
Last logged: 6:26:30 PM

Request exception for 'https://github.com/login/device/code' with - Cannot connect to host github.com:443 ssl:default [Try again]

Diagnostics dump

If I understand this correctly, this is a download from the device (integration?). If so, this is not possible since the HACS integration has failed to install.

hacs-bot[bot] commented 1 year ago

Make sure you have read the issue guidelines and that you filled out the entire template.

If you have an issue identical to this, do not add comments like "same here", "i have this too", instead add a :+1: reaction to the issue description. Thanks! :+1:

Segullah commented 1 year ago

P.S. I saw the previous closed issue for this, #3087. But I'm not using a VPN and as I've posted above, in terminal I can access the GitHub server.

whomai123 commented 1 year ago

I have the same issue today while im re-installing home assistant and trying to install HACS, it looks like the new version of Home Assistant uses IPv6 instead of IPv4 when it does wget command, not sure if this is related to HACS but 'https://github.com/login/device/code' seems to be 404 error.

ludeeus commented 1 year ago

This is not a bug in HACS. You get that when there are some sort of communication issue.

Segullah commented 1 year ago

You may be right. I've noticed a few other things that don't seem to be working as they should. Let me toss this over to the community and see if there's any insight into what the communication problem might be. I'll post the link to that posting here so others in the future can follow the trail on this.

EDIT: I've posted the question at [https://community.home-assistant.io/t/hacs-communication-issue-could-not-authenticate-with-github/613659]

Segullah commented 1 year ago

Found a solution that worked for me. Apparently the problem was related to using BalenaEtcher to write HAOS to the server hard drive (BE would stall at 31%, but HAOS would still boot, making it appear that everything was fine). So I started over and used USBimager according to https://community.home-assistant.io/t/flashing-hard-drive-get-stuck-at-31-balena-fetcher/604336/48?u=segullah. Had a successful install of HAOS and all the problems I was having (this one and other integrations like radiobrowser that need to access URLs) went away.

As far as I'm concerned, I'm done with this ticket but don't know whether to close it or leave it open for @whomai123.