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
git on SD Card: "insufficient permission for adding an object" #5179
Comments
I have the same issue with network drives using drvfs to mount. Is this a problem in WSL 2? I am limited to WSL 1 by Windows versions. |
Can confirm that this is still a problem in WSL2 |
I had issues with executing git commands from VS Code, so this two commands help me. Executed inside the WSL ubuntu chmod -R g+rws .git/ |
Seeing this issue on WSL1/UBUNTU20.04. The write bit is checked on windows-security and drive is mounted on linux with metadata option(uid,gid,umask,fmask) by giving full directory and file permission on ubuntu 20.04. Git on linux cannot write to a windows NTFS directory by a local ubuntu user. The local ubuntu user owns this directory/drvfs has permission on directory and files.
|
For me the issue was due to strangely changed ownership to root in some of the folders inside .git/objects Try do the following:
P.S. Most of the mailfunction i've met in WSL to Windows interaction so far was this ownership issue |
None of the above worked for me, I'm using git with WSL1 on a mounted exFat drive, all modes are 777, and owned by current user. Then I ran
Then I
So it seems that I've found the problem: the files that
|
Windows build number: Microsoft Windows [Version 10.0.18363.778]
I'm trying to get Git working on my WSL, but I always get the error
error: insufficient permission for adding an object to repository database ....../.git/objects
I'm working on a Surface Pro 5 in Windows Subsystem for Linux with Ubuntu.
Everything is working fine if I'm working on the internal drive.
The problem starts when I want to work on my micro SD Card.
First it wasn't mounted automatically.
I fixed that by editing the
/etc/fstab
file:E:\ /mnt/e drvfs defaults,rw,exec,uid=nico,gid=nico 0 0
and
ls -alR
shows that permissions should be rw for all users and all files on my SD Card.I tried
git add
on an existing repository on this SD Card and it didn't work.I noticed that it created a tmp file in '.git/objects/54/' which had no write permissions every time I tried it.
Then I tried to clone a Test Repository but it only created the folder for a splitsec and gave me the same error. It is working though on my normal drive C: but not on my SD Card. Even if I add
sudo
to the command.Somehow git isn't working properly with the permissions in the WSL.
I already tried:
and reinstalling git.
Has anyone any idea how to fix it?
Here is also the output of
mount
:I only know what C: (my main drive) and E: (my SD Card) are. The rest seems to be WSL specific I think.
The text was updated successfully, but these errors were encountered: