-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Fatal error: git failed" in postCreateCommand on python3.11 #916
Comments
Hi 👋 @pamelafox Are you able to reproduce the issue today? Also, does the issue appears consistently? I tried reproducing with the https://github.com/Azure-Samples/ai-rag-chat-evaluator repository, the codespace was created fine with successfully executed lifecycle commands. |
I have never been able to replicate the issue personally, I've only gotten multiple reports from users across different repositories with similar postCreateCommand's. I believe both cases were local dev containers. I'll find out their OS. |
Hello, I have also been struggling with this issue for the past few months and have not been able to solve it. The following project has this issue: https://github.com/langestefan/python-package-template I am currently testing this on windows 11, but the issue was also present on ubuntu and mint at some point. - Edit: - It seems to be caused by files going corrupt when rebuilding the container. I had a bunch of permission denied errors from
Rebuilding the container, or rebuilding without cache didn't solve this. So I deleted the project and pulled it from git, now - Edit 2: - Made a new repository based on my template, issue is back. It seems related to this: microsoft/vscode-remote-release#7628 |
I am honestly not sure if this is an error with the images, Dev Containers extension, or CLI, but am starting here.
In the past week, I've gotten reports on two repositories of errors from my postCreateCommand script that worked fine before. The script calls "pre-commit install" which sets up pre-commit hooks for the current git repository. In both cases, the developer opening the dev container was indeed opening it from a git repository, so it should have worked.
Here are the reports:
Azure-Samples/ai-rag-chat-evaluator#2
pamelafox/simple-fastapi-container#42
The error is:
"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 [18551 ms] postCreateCommand failed with exit code 1. Skipping any further user-provided commands."
The postCreateCommand is "pip install -r requirements-dev.txt && pre-commit install"
Both repositories are using "mcr.microsoft.com/devcontainers/python:3.11" although the second one is using "-bullseye" pin specifically.
Did anything change with the images in terms of their git support in the last 1-2 weeks? If not, then I'll ask the extension team if something changed on their side.
I do not believe it's an issue with pre-commit as they haven't had a recent release. Thanks!
The text was updated successfully, but these errors were encountered: