linux - Permissions Issue When Pulling from GitHub -


i have cloned github repository new directory on local machine using:

git clone git@github.com:*****/project.git destination-dir 

clone worked fine whenever try pull or push git error back:

error: insufficient permission adding object repository database .git/objects fatal: git write-tree failed write tree 

what have done wrong? , how can fix this. read far online, problem trivial if using own repository (i.e. not github) should if on github (there no ssh access).

also, should add have directory on machine pointing same repository on github fine pulls , push.

this doesn't related github per-se.

from in comments, seems write permissions inside hidden .git folder (which contains of local git repository data) not corresponding permissions git client had when ran it.

it can cloned repository 1 user account (or using sudo), trying pull/push different user. if wasn't case, have messed local files permissions while cloning.

as stated, doing chown -r login:group projectdir/ fixed problem because recursively reset permissions in project folder (including of .git folder , contents).


a experiment trying clone same repo different folder see if problem reoccurs. if does, maybe wrong default permission usermask and/or git client permissions.


Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

jquery - How would i go about shortening this code? And to cancel the previous click on click of new section? -