4
I have a GIT repository on an SSH server and when trying to push, the following happens:
Counting objects: 16, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (14/14), done.
Writing objects: 100% (16/16), 1.35 KiB | 1.35 MiB/s, done.
Total 16 (delta 9), reused 0 (delta 0)
error: unable to write sha1 filename ./objects/da/ffdcd5a57dd3f3b9d8aed54e4439dc0fe0a558:
Permissão negada
error: unable to write sha1 filename ./objects/75/aa2521a79e4d6af862dce838331155aed96550:
Permissão negada
error: unable to write sha1 filename ./objects/1c/0a5357051d2b326dc77e7e53fe7d1384c86ad1:
Permissão negada
To ssh://192.168.0.5/opt/project.git
! [remote rejected] master -> master (unable to migrate objects to permanent storage)
error: failed to push some refs to 'ssh://192.168.0.5/opt/project.git'
I noticed that in the remote repository, these folders are created with write permission only for those who created them. That is if someone else pushed and created these folders with permission only for them, when I try to push and overwrite one of these folders I won’t be able.
[EDIT] I realized that in my local repository these folders are created with files with permission only for those who created them, so when I push they go together and if other users want to overwrite they will not be able
How to make these folders not be created with permission only for the owner?
Have you tried using a
git push --force
? With me it worked in a situation, but be aware that by doing so it will delete everything in the current repository and replace it with content you are trying to upload.– Mateus Daniel
You have configured SSH Keys?
– Kayo Bruno