How to push to LAN repository

142 Views Asked by At

I have a git bare project setup on my laptop, from my desktop I cloned it, modified a couple of files and wanted to push it, but getting error:

remote: error: unable to write sha1 filename //MACBOOK/Macintosh HD/Users/me/Dev/project.git/./objects/incoming-xxxx/46/76325e2cdd34d7d3: Permission denied

I access to remote my repository with user and password. how can I push changes to the repository?

1

There are 1 best solutions below

8
On

Few reasons

SSH keys

In your case, doesn't seem like the problem since you have local repo under your account

Shared repository configuration

# try to set this flag to true
git config core.sharedRepository true

core.sharedRepository

When group (or true), the repository is made shareable between several users in a group (making sure all the files and objects are group-writable).

When all (or world or everybody), the repository will be readable by all users, additionally to being group-shareable.

False by default.