Same problem here.
File "/esphome/esphome/git.py", line 95, in clone_or_update
old_sha = run_git_command(["git", "rev-parse", "HEAD"], str(repo_dir))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/esphome/esphome/git.py", line 32, in run_git_command
raise cv.Invalid(err_str)
voluptuous.error.Invalid: fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
I’ve had that for a couple of days now
Sometimes I get this error:
Traceback (most recent call last):
File "/usr/local/bin/esphome", line 33, in <module>
sys.exit(load_entry_point('esphome', 'console_scripts', 'esphome')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/esphome/esphome/__main__.py", line 1041, in main
return run_esphome(sys.argv)
^^^^^^^^^^^^^^^^^^^^^
File "/esphome/esphome/__main__.py", line 1028, in run_esphome
rc = POST_CONFIG_ACTIONS[args.command](args, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/esphome/esphome/__main__.py", line 458, in command_run
exit_code = write_cpp(config)
^^^^^^^^^^^^^^^^^
File "/esphome/esphome/__main__.py", line 193, in write_cpp
return write_cpp_file()
^^^^^^^^^^^^^^^^
File "/esphome/esphome/__main__.py", line 211, in write_cpp_file
writer.write_cpp(code_s)
File "/esphome/esphome/writer.py", line 344, in write_cpp
copy_src_tree()
File "/esphome/esphome/writer.py", line 297, in copy_src_tree
copy_files()
File "/esphome/esphome/components/esp32/__init__.py", line 676, in copy_files
repo_dir, _ = git.clone_or_update(
^^^^^^^^^^^^^^^^^^^^
File "/esphome/esphome/git.py", line 70, in clone_or_update
run_git_command(cmd)
File "/esphome/esphome/git.py", line 31, in run_git_command
raise cv.Invalid(lines[-1][len("fatal: ") :])
voluptuous.error.Invalid: fetch-pack: invalid index-pack output
The error keeps changing. Today I get this error:
voluptuous.error.Invalid: Cloning into '/data/idf_components/b0ad5728/components/esp-sr'...
error: RPC failed; curl 92 HTTP/2 stream 5 was not closed cleanly: CANCEL (err 8)
error: 7659 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
fatal: clone of 'https://github.com/espressif/esp-sr.git' into submodule path '/data/idf_components/b0ad5728/components/esp-sr' failed
Failed to clone 'components/esp-sr'. Retry scheduled
Cloning into '/data/idf_components/b0ad5728/components/esp-sr'...
error: RPC failed; curl 92 HTTP/2 stream 5 was not closed cleanly: CANCEL (err 8)
error: 7264 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
fatal: clone of 'https://github.com/espressif/esp-sr.git' into submodule path '/data/idf_components/b0ad5728/components/esp-sr' failed
Failed to clone 'components/esp-sr' a second time, aborting