mirror of
https://github.com/initialcommit-com/git-sim.git
synced 2026-04-26 19:15:51 +03:00
[GH-ISSUE #70] Dockerized git-sim fails to run with various errors #45
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/git-sim#45
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @durka on GitHub (Mar 7, 2023).
Original GitHub issue: https://github.com/initialcommit-com/git-sim/issues/70
I followed the Docker installation instructions.
Running git-sim in its own repo checkout results in an "SHA could not be resolved" error:
In another repo, I get "Reference at 'HEAD' does not exist":
@initialcommit-io commented on GitHub (Mar 7, 2023):
@durka Hmm I just tested locally on my Mac and was able to run the Dockerized git-sim commands.
The errors you're getting are a bit weird since it seems it's not able to find a reference to HEAD in the local Git repo, which is odd because HEAD should always be present in a non-corrupt Git repo.
Did you clone down the git-sim repo and not just download it from GitHub? Basically just want to make sure it's a valid Git repo. You can confirm by running
git show HEAD, or just agit logto make sure that HEAD is set and accessible.Can you also let me know the OS you're on and exactly what commands you ran and in what order?
@durka commented on GitHub (Mar 9, 2023):
Hey, I'm running on Ubuntu 22.04, though what's weird is you'd think that wouldn't matter with Docker.
I ran these commands:
@initialcommit-io commented on GitHub (Mar 9, 2023):
@durka I wonder if it's just a file permissions issue, where the dockerized instance of the command doesn't have access to the local files in your Git repo and the Git repo itself (.git folder). This might be causing GitPython - the library that git-sim uses to interact with the local Git repo - to choke.
Can you try running the docker command with sudo?
@durka commented on GitHub (Mar 9, 2023):
Ah you're right, it is permissions. It seems the docker container runs as root internally. If I redefine the function like so, it works (sudo not required, I didn't try that but I don't like to run stuff as sudo normally):
(btw, also note the semicolon which is missing from the README)
@initialcommit-io commented on GitHub (Mar 9, 2023):
Nice! Glad you got it to work. I'll add the semi-colon. I'll close this one since you got it working 😸