For Ubuntu (or any Linux)
From project root,
cd .git/objects
ls -al
sudo chown -R yourname:yourgroup *
You can tell what yourname and yourgroup should be by looking at the permissions on the majority of the output from that ls -al command
Note: remember the star at the end of the sudo line