Git Repair Permissions

After you have identified and fixed the underlying cause (see below), you’ll want to repair the permissions:

cd /path/to/repo.git
chgrp -R groupname .
chmod -R g+rwX .
find . -type d -exec chmod g+s '{}' +

Underlying Causes

The error could be caused by one of the following:

  • The repository isn’t configured to be a shared repository (see core.sharedRepository in git help config). If the output of:
    git config core.sharedRepository

    is not group or true or 1 or some mask, try running:

    git config core.sharedRepository group

    and then re-run the recursive chmod and chgrp (see “Repair Permissions” above).

  • The operating system doesn’t interpret a setgid bit on directories as “all new files and subdirectories should inherit the group owner”.

    When core.sharedRepository is true or group, Git relies on a feature of GNU operating systems (e.g., every Linux distribution) to ensure that newly created subdirectories are owned by the correct group (the group that all of the repository’s users are in). This feature is documented in the GNU coreutils documentation:

    … [If] a directory’s set-group-ID bit is set, newly created subfiles inherit the same group as the directory, and newly created subdirectories inherit the set-group-ID bit of the parent directory. … [This mechanism lets] users share files more easily, by lessening the need to use chmodor chown to share new files.

    However, not all operating systems have this feature (NetBSD is one example). For those operating systems, you should make sure that all of your Git users have the same default group. Alternatively, you can make the repository world-writable by running git config core.sharedRepository world (but be careful—this is less secure).

  • The file system doesn’t support the setgid bit (e.g., FAT). ext2, ext3, ext4 all support the setgid bit. As far as I know, the file systems that don’t support the setgid bit also don’t support the concept of group ownership so all files and directories will be owned by the same group anyway (which group is a mount option). In this case, make sure all Git users are in the group that owns all the files in the file system.
  • Not all of the Git users are in the same group that owns the repository directories. Make sure the group owner on the directories is correct and that all users are in that group.

Ref: http://stackoverflow.com/questions/6448242/git-push-error-insufficient-permission-for-adding-an-object-to-repository-datab



git, Uncategorized

Git Repo Configuration Step By Step

Git Server Configuration on Ubuntu 

Create New Users if not exits: 

sudo useradd safi
Create a New Group for the project 
sudo groupadd testgroup
Add user to the Group : 

Now that the group exists, add the two users to it:

sudo usermod -a -G testgroup safi
sudo usermod -a -G testgroup kafi
View All USER and GROUP: 

All users:

$ getent passwd

All groups:

$ getent group
CREATE A bare repository : at var/www/git/ 
git init –bare <directory> [directory==projectFolder.git]
All Set Now Need to give the write permission to the group for
this Repository.

Now all that’s left is to set the permissions on the directory:

sudo chgrp -R testgroup /path/to/the/directory
sudo chmod -R 770 /path/to/the/directory
References :

Drupal8 Development Environment With VM and Vagrant

As its Drupal 8 need a Rich Server configuration. If we follow the Local Environment development it need to change configurations. But we could up and run the VDD () and get start with Drupal 8 without knowing the Server configuration. :)


Installing Virtualbox:

Navigate to https://www.virtualbox.org/wiki/Downloads and grab a copy of the installer for your OS/Platform, and install it!

Installing Vagrant:

Make sure you followed the step above and installed Virtualbox. Otherwise, you won’t be able to install Vagrant. Navigate to http://www.vagrantup.com/downloads.html and, again, grab a copy of the installer for your OS/Platform, and install it!

If you previously had Virtualbox installed, make sure to back up your current VMs before proceeding with this tutorial.

Clone the VDD repo in to your home directory (~/):

git clone --branch 8.x-1.x http://git.drupal.org/project/vdd.git
cd vdd 

VDD automatically creates drush aliases for each site in the config.json file at


vagrant up

Once this is complete, you’ll see the following in the terminal:

==> default: =============================================================
==> default: Install finished! Visit in your browser.
==> default: =============================================================

In Windows, edit the following file as an administrator in your text editor of choice:


I’m only going to add an entry for Drupal 8 here, as the VDD summary page noted above ( describes the entries you may wish to add for other Drupal versions. drupal8.dev www.drupal8.dev

Now issue the following command to reload your VM configuration, from the VDD root directory on your host system:

vagrant reload

To install Drupal 8 on your new virtual machine :

vagrant ssh

By - William Hetherington

Ref:  https://drupalize.me/blog/201512/tutorial-vagrant-drupal-8-development


Center an element Vertically and Horaizontally

Setting top: 0; left: 0; bottom: 0; right: 0; gives the browser a new bounding box for the block. At this point the block will fill all available space in its offset parent, which is the body or position: relative; container.
W3.org: If none of the three [top, bottom, height] are ‘auto’: If both ‘margin-top’ and ‘margin-bottom’ are ‘auto’, solve the equation under the extra constraint that the two margins get equal values. AKA: center the block vertically.


You are looking into the absolute Centering element



position: relative;
background: gray;
background: #2e5f3e;
color: #4fa46b;
width: 100%;
height: 400px;
clear: both;

width: 50%;
height: 50%;
max-height: 150px;
position: absolute;
overflow: auto;
margin: auto;
top: 0; left: 0; bottom: 0; right: 0;
padding: 20px;
background: orange;
color: white;

Code Pan Example : http://codepen.io/moshiuramit/pen/jWqwmG

REF:  http://codepen.io/shshaw/details/gEiDt