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

 找回密码
 立即注册
查看: 787|回复: 2

[求助] 部署开发容器

[复制链接]

20

主题

136

帖子

827

积分

高级会员

Rank: 4

积分
827
金钱
691
HASS币
0
发表于 2024-7-4 00:04:50 | 显示全部楼层 |阅读模式
本帖最后由 flamestsui 于 2024-7-4 02:04 编辑

昨天手贱,无意中删除了之前部署的容器
到现在部署不回来了
哪位大佬给点思路呢?
用Codespace能打开,但是,总所周知的原因,想部署在本地。

VSCode通过SSH连接Ubuntu的docker

在部署的时候
一直报错:

Resolved 89 packages in 951ms
Audited 89 packages in 0.23ms
An error has occurred: FatalError: git failed. Is it installed, and are you in a Git repository directory?
Check the log at /home/vscode/.cache/pre-commit/pre-commit.log
[36491 ms] postCreateCommand failed with exit code 1. Skipping any further user-provided commands.


Snipaste_2024-07-04_01-54-26.jpg

回复

使用道具 举报

48

主题

1674

帖子

6780

积分

论坛元老

Rank: 8Rank: 8

积分
6780
金钱
5096
HASS币
40
发表于 2024-7-4 10:32:03 | 显示全部楼层
日志很明确了
折腾精神永存,感恩感谢论坛每一位愿意分享和帮助过我的大佬,论坛有你更精彩
回复

使用道具 举报

20

主题

136

帖子

827

积分

高级会员

Rank: 4

积分
827
金钱
691
HASS币
0
 楼主| 发表于 2024-7-4 14:56:15 | 显示全部楼层
本帖最后由 flamestsui 于 2024-7-4 15:17 编辑

这是HA生成的容器,容器环境都是HA配置的。我进入到docker里面查看,也有git
```
An error has occurred: FatalError: git failed. Is it installed, and are you in a Git repository directory?
```

```
Traceback (most recent call last):
  File "/home/vscode/.local/ha-venv/lib/python3.12/site-packages/pre_commit/git.py", line 58, in get_root
    cmd_output('git', 'rev-parse', '--show-cdup')[1].strip(),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vscode/.local/ha-venv/lib/python3.12/site-packages/pre_commit/util.py", line 117, in cmd_output
    returncode, stdout_b, stderr_b = cmd_output_b(*cmd, **kwargs)
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vscode/.local/ha-venv/lib/python3.12/site-packages/pre_commit/util.py", line 111, in cmd_output_b
    raise CalledProcessError(returncode, cmd, stdout_b, stderr_b)
pre_commit.util.CalledProcessError: command: ('/usr/local/bin/git', 'rev-parse', '--show-cdup')
return code: 128
stdout: (none)
stderr:
    fatal: not a git repository (or any parent up to mount point /workspaces)
    Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/vscode/.local/ha-venv/lib/python3.12/site-packages/pre_commit/error_handler.py", line 73, in error_handler
    yield
  File "/home/vscode/.local/ha-venv/lib/python3.12/site-packages/pre_commit/main.py", line 373, in main
    _adjust_args_and_chdir(args)
  File "/home/vscode/.local/ha-venv/lib/python3.12/site-packages/pre_commit/main.py", line 183, in _adjust_args_and_chdir
    toplevel = git.get_root()
               ^^^^^^^^^^^^^^
  File "/home/vscode/.local/ha-venv/lib/python3.12/site-packages/pre_commit/git.py", line 64, in get_root
    raise FatalError(
pre_commit.errors.FatalError: git failed. Is it installed, and are you in a Git repository directory?
```


回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-12-23 17:40 , Processed in 0.101567 second(s), 27 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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