『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
楼主: muxiachuixue

[学习笔记] 手把手教你解决HACS无法访问github问题:无需科学上网

  [复制链接]

0

主题

41

帖子

273

积分

中级会员

Rank: 3Rank: 3

积分
273
金钱
232
HASS币
0
发表于 2021-10-18 11:47:15 | 显示全部楼层
大神这个代码都要输入到什么地方,纯小白一枚,讲讲好吗
回复

使用道具 举报

5

主题

357

帖子

2048

积分

金牌会员

Rank: 6Rank: 6

积分
2048
金钱
1676
HASS币
60
 楼主| 发表于 2021-10-18 11:53:34 | 显示全部楼层
星辰大海 发表于 2021-10-18 11:47
大神这个代码都要输入到什么地方,纯小白一枚,讲讲好吗

帖子里不是说的很清楚吗?
回复

使用道具 举报

0

主题

41

帖子

273

积分

中级会员

Rank: 3Rank: 3

积分
273
金钱
232
HASS币
0
发表于 2021-10-18 11:56:59 | 显示全部楼层
muxiachuixue 发表于 2021-10-18 11:53
帖子里不是说的很清楚吗?

我是刚刚接触。很多不懂。大神指点一下我。是在这个Terminal & SSH插件里面输入代码吗
回复

使用道具 举报

5

主题

357

帖子

2048

积分

金牌会员

Rank: 6Rank: 6

积分
2048
金钱
1676
HASS币
60
 楼主| 发表于 2021-10-18 12:04:20 | 显示全部楼层
星辰大海 发表于 2021-10-18 11:56
我是刚刚接触。很多不懂。大神指点一下我。是在这个Terminal & SSH插件里面输入代码吗 ...

你要先远程连接到装HA的服务器(树莓派、N1或者其他),然后去服务器上面对应文件位置修改啊,修改的路径帖子里面有了。至于SSH用法、linux的基础这些我不可能在帖子里面讲吧,这些基础的东西google一下都能找到答案
回复

使用道具 举报

0

主题

41

帖子

273

积分

中级会员

Rank: 3Rank: 3

积分
273
金钱
232
HASS币
0
发表于 2021-10-18 12:09:46 | 显示全部楼层
muxiachuixue 发表于 2021-10-18 12:04
你要先远程连接到装HA的服务器(树莓派、N1或者其他),然后去服务器上面对应文件位置修改啊,修改的路径 ...

好的谢谢。
回复

使用道具 举报

20

主题

122

帖子

1981

积分

金牌会员

Rank: 6Rank: 6

积分
1981
金钱
1859
HASS币
10
发表于 2021-10-18 14:01:13 | 显示全部楼层
Could not authenticate with GitHub, try again later.

这个是什么原因
回复

使用道具 举报

0

主题

4

帖子

42

积分

新手上路

Rank: 1

积分
42
金钱
37
HASS币
0
发表于 2021-10-18 14:50:47 | 显示全部楼层
运行replace_hacs_download_mirror.sh后显示
replace_hacs_download_mirror.sh:lin 9: sudo:not found
replace_hacs_download_mirror.sh:lin 13: sudo:not found
这是replace_hacs_download_mirror.sh文件里的内容
# Run this file with sh command to auto REPLACE the github download website in HACS download.py file /config/custom_components/hacs/helpers/functions/download.py
# Script by chuixue
#! /bin/bash

# The following is the default download.py file path. Change it if yours is not the current path.
download_py_path="/usr/share/hassio/homeassistant/custom_components/hacs/helpers/functions/download.py"

# Delete the old lines if it is available
sudo sed  -i '/url = url.replace("raw.githubusercontent.com", "raw.fastgit.org")/,/url = url.replace("\/\/github.com\/", "\/\/hub.fastgit.org\/")/d' $download_py_path


# Add the new lines
sudo sed -i '/if "tags\/" in url:/i\    url = url.replace("raw.githubusercontent.com", "raw.fastgit.org")\n    if "releases/download/" in url or "archive/refs/" in url:\n        url = url.replace("//github.com/", "//hub.fastgit.org/")' $download_py_path


回复

使用道具 举报

5

主题

357

帖子

2048

积分

金牌会员

Rank: 6Rank: 6

积分
2048
金钱
1676
HASS币
60
 楼主| 发表于 2021-10-18 17:18:09 | 显示全部楼层
se7enxl 发表于 2021-10-18 14:50
运行replace_hacs_download_mirror.sh后显示
replace_hacs_download_mirror.sh:lin 9: sudo:not found
r ...

sudo 没安装好或者没添加到环境变量,百度或者google一下很容易找到解决方案
回复

使用道具 举报

3

主题

19

帖子

176

积分

注册会员

Rank: 2

积分
176
金钱
157
HASS币
0
发表于 2021-10-18 17:26:05 | 显示全部楼层
大神请教一下,我是docker安装的homeassistant container,手动安装的hacs最新版1.15,按照操作前两步都正常,第三步添加源的界面跟你的不一样,也添加不上,翻译过来是主服务器的存储结构不兼容,请问是怎么回事呀? 微信截图_20211018172030.png 微信截图_20211018172118.png
回复

使用道具 举报

5

主题

357

帖子

2048

积分

金牌会员

Rank: 6Rank: 6

积分
2048
金钱
1676
HASS币
60
 楼主| 发表于 2021-10-18 17:40:55 | 显示全部楼层
pv0402 发表于 2021-10-18 17:26
大神请教一下,我是docker安装的homeassistant container,手动安装的hacs最新版1.15,按照操作前两步都正 ...

看帖不仔细啊:HACS-加载项-加载项商店-右上角添加新的repo,地址填:http://github.com/hassio-addons/repository       HACS进去后选加载项,不是选集成
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-5-19 02:44 , Processed in 0.080137 second(s), 32 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表