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

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

[学习笔记] 干货:解决supervisor商店插件add-ons无法加载的问题

  [复制链接]

14

主题

187

帖子

2719

积分

金牌会员

Rank: 6Rank: 6

积分
2719
金钱
2532
HASS币
0
发表于 2022-5-12 12:46:25 | 显示全部楼层
22-05-12 12:39:30 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/home-assistant/addons repository
22-05-12 12:39:30 ERROR (MainThread) [supervisor.jobs] Unhandled exception: Remote 'origin' has no refspec set.
You can set it as follows: 'git config --add "remote.origin.fetch +refs/heads/*:refs/heads/*"'.
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 106, in wrapper
    return await self._method(*args, **kwargs)
  File "/usr/src/supervisor/supervisor/store/git.py", line 155, in pull
    await self.sys_run_in_executor(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/git/remote.py", line 876, in fetch
    self._assert_refspec()
  File "/usr/local/lib/python3.9/site-packages/git/remote.py", line 835, in _assert_refspec
    raise AssertionError(msg % (self.name, self.name))
AssertionError: Remote 'origin' has no refspec set.
You can set it as follows: 'git config --add "remote.origin.fetch +refs/heads/*:refs/heads/*"'.
22-05-12 12:39:31 ERROR (MainThread) [asyncio] Task exception was never retrieved
future: <Task finished name='Task-202242' coro=<Repository.update() done, defined at /usr/src/supervisor/supervisor/store/repository.py:106> exception=JobException()>
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 106, in wrapper
    return await self._method(*args, **kwargs)
  File "/usr/src/supervisor/supervisor/store/git.py", line 155, in pull
    await self.sys_run_in_executor(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/git/remote.py", line 876, in fetch
    self._assert_refspec()
  File "/usr/local/lib/python3.9/site-packages/git/remote.py", line 835, in _assert_refspec
    raise AssertionError(msg % (self.name, self.name))
AssertionError: Remote 'origin' has no refspec set.
You can set it as follows: 'git config --add "remote.origin.fetch +refs/heads/*:refs/heads/*"'.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/store/repository.py", line 110, in update
    await self.git.pull()
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 112, in wrapper
    raise JobException() from err
supervisor.exceptions.JobException
22-05-12 12:39:31 INFO (MainThread) [supervisor.store] Loading add-ons from store: 24 all - 0 new - 0 remove
大神帮我看下我这个要怎么弄啊?
回复

使用道具 举报

3

主题

58

帖子

729

积分

高级会员

Rank: 4

积分
729
金钱
671
HASS币
0
发表于 2022-5-25 19:22:39 | 显示全部楼层
成功解决了!
不懂编程、英语很差的小白
回复

使用道具 举报

0

主题

1

帖子

16

积分

新手上路

Rank: 1

积分
16
金钱
15
HASS币
0
发表于 2022-5-28 21:14:12 | 显示全部楼层
感谢,刚入门正好需要
回复

使用道具 举报

14

主题

187

帖子

2719

积分

金牌会员

Rank: 6Rank: 6

积分
2719
金钱
2532
HASS币
0
发表于 2022-6-4 11:12:43 | 显示全部楼层
22-06-04 10:45:39 INFO (MainThread) [supervisor.store.git] Update add-on https://hub.fastgit.xyz/home-assistant/addons repository
22-06-04 10:47:39 ERROR (MainThread) [supervisor.store.git] Can't update https://hub.fastgit.xyz/home-assistant/addons repo: Cmd('git') failed due to: exit code(128)
  cmdline: git fetch -v --update-shallow --depth=1 origin
  stderr: 'fatal: unable to access 'https://github.com/home-assistant/addons/': HTTP/2 stream 1 was not closed cleanly before end of the underlying stream'.
22-06-04 10:47:39 INFO (MainThread) [supervisor.resolution.module] Create new issue IssueType.CORRUPT_REPOSITORY - ContextType.STORE / core
22-06-04 10:47:39 INFO (MainThread) [supervisor.resolution.module] Create new suggestion SuggestionType.EXECUTE_RESET - ContextType.STORE / core
22-06-04 10:47:39 ERROR (MainThread) [asyncio] Task exception was never retrieved
future: <Task finished name='Task-525' coro=<Repository.update() done, defined at /usr/src/supervisor/supervisor/store/repository.py:106> exception=StoreGitError()>
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/store/git.py", line 155, in pull
    await self.sys_run_in_executor(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/git/remote.py", line 886, in fetch
    res = self._get_fetch_info_from_stderr(proc, progress,
  File "/usr/local/lib/python3.9/site-packages/git/remote.py", line 750, in _get_fetch_info_from_stderr
    proc.wait(stderr=stderr_text)
  File "/usr/local/lib/python3.9/site-packages/git/cmd.py", line 502, in wait
    raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git fetch -v --update-shallow --depth=1 origin
  stderr: 'fatal: unable to access 'https://github.com/home-assistant/addons/': HTTP/2 stream 1 was not closed cleanly before end of the underlying stream'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/store/repository.py", line 110, in update
    await self.git.pull()
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 108, in wrapper
    raise err
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 106, in wrapper
    return await self._method(*args, **kwargs)
  File "/usr/src/supervisor/supervisor/store/git.py", line 195, in pull
    raise StoreGitError() from err
supervisor.exceptions.StoreGitError
22-06-04 10:47:40 INFO (MainThread) [supervisor.store] Loading add-ons from store: 23 all - 0 new - 0 remove
回复

使用道具 举报

0

主题

8

帖子

85

积分

注册会员

Rank: 2

积分
85
金钱
77
HASS币
0
发表于 2022-6-17 14:16:21 | 显示全部楼层
牛 我单独重启 supervisor 容器就可以了这应该是一个bug并非完全的网络问题
回复

使用道具 举报

0

主题

1

帖子

36

积分

新手上路

Rank: 1

积分
36
金钱
35
HASS币
0
发表于 2022-7-5 07:56:51 | 显示全部楼层
好像还真的行...   
网络太迷了, 都不知道是梯子起作用了还是修改起作用了....
先赞
回复

使用道具 举报

0

主题

51

帖子

428

积分

中级会员

Rank: 3Rank: 3

积分
428
金钱
377
HASS币
0
发表于 2022-7-5 15:51:49 | 显示全部楼层
这个真不错,软件商店终于不再是空白了。
回复

使用道具 举报

3

主题

118

帖子

843

积分

高级会员

Rank: 4

积分
843
金钱
725
HASS币
0
发表于 2022-8-11 09:46:44 | 显示全部楼层
干货:解决supervisor商店插件add-ons无法加载的问题
回复

使用道具 举报

3

主题

118

帖子

843

积分

高级会员

Rank: 4

积分
843
金钱
725
HASS币
0
发表于 2022-8-11 09:49:22 | 显示全部楼层
宿主机执行crontab -e 报错:   /bin/ash: crontab: not found
回复

使用道具 举报

2

主题

6

帖子

45

积分

新手上路

Rank: 1

积分
45
金钱
39
HASS币
0
发表于 2022-8-28 17:38:04 | 显示全部楼层
非常好用
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-25 10:44 , Processed in 0.319326 second(s), 30 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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