On performing :
$ git push -u origin --all
I got an error:
remote: error: insufficient permission for adding an object to repository database ./objects
I googled, and find out a solution by Richard Hansen.
I had to perform:
$ git config core.sharedRepository group
Rather, I executed it as:
$ git config core.sharedRepository dev
because i thought I have to enter name of group in the actual command(here "dev" is the name of the group which has a user, named "gituser").
Since then, whenever I am trying to execute any command in Git Bash, it is saying:
fatal: bad numeric config value 'dev' for 'core.sharedrepository' in .git/config: invalid unit
For this too, I found a solution at this link
which says:
When you enter an invalid value for git config core.sharedRepository, it may fail continuously rather than let you update again with this command:
git core.sharedRepository group
In which case you will need to open up the .git/config file and alter the file manually, like so:
[core] ... sharedRepository = group
I did this, but all in vain. Still any command in Git Bash gives the same error :
fatal: bad numeric config value 'dev' for 'core.sharedrepository' in .git/config: invalid unit
Can somebody please help me in solving this issue. Thanks in advance.
I thought I have to enter name of group in the actual command
No: dev
is simply not a valid value for that setting.
Try 'group
' only.
git config core.sharedRepository group
If you need to modify manually the config, make sure to look for the .git/config
file in your local cloned repo (not on the server).
The correct values are:
core.sharedRepository
group
(ortrue
): the repository is made shareable between several users in a group (making sure all the files and objects are group-writable).all
(orworld
oreverybody
): the repository will be readable by all users, additionally to being group-shareable.umask
(orfalse
): Git will use permissions reported byumask(2)
.0xxx
: where0xxx
is an octal number, files in the repository will have this mode value.0xxx
will override user’s umask value (whereas the other options will only override requested parts of the user’s umask value).
Examples:
0660
will make the repo read/write-able for the owner and group, but inaccessible to others (equivalent togroup
unless umask is e.g.0022
).0640
is a repository that is group-readable but not group-writable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With