Insufficient rights in the Git server in /objects

I did make my own GIT server and I am very happy using 3 Ghz with 40 GB HDD and 512 Ram DDR and a separate video card. With 32 bit Ubuntu 12.10.

For beginning I made SSH access to the PC using the local IP address so I can connect to it from outside.
So you install the open ssh server and you create a new user in ubuntu using adduser with username and pass. Then you enter  /etc/ssh/sshd_config and edit it:

Port 1234 //Port
PermitRootLogin no //if you can use it as root
AllowUsers jim //for which user is allowed

For the router I made a Virtual Server so it redirects the accepted request to a given local IP address.

I installed git-core in a separate folder in which I entered git init –bare where the files will be kept for a given project. You also have a shared profile which will be used for the access to the server. You can get an access rights error:
error: insufficient permission for adding an object to repository database ./objects
So you can fix it using:
sudo chown hatim:hatim(the user) .git(pathto the git folder) -R

You may also like...